Free Electron
Orchestrator.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __moa_Orchestrator_h__
8 #define __moa_Orchestrator_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /// @brief Basic OrchestratorI implementation
16 class FE_DL_EXPORT Orchestrator :
17  virtual public OrchestratorI,
18  public Initialize<Orchestrator>
19 {
20  public:
21  Orchestrator(void);
22 virtual ~Orchestrator(void);
23  void initialize(void);
24 
25 virtual void datasetInitialize(sp<RecordGroup> a_rg_dataset);
26 virtual bool compile(void);
27 virtual void perform(const char *a_label) { perform(note_id(a_label)); }
28 virtual void perform(const t_note_id &a_note_id);
29 
30 virtual t_note_id note_id(const char *a_label);
31 virtual t_note_id connect(SystemI * a_system, const char *a_label);
32 virtual t_note_id connect(sp<SystemI> a_system,const char *a_label);
33 
34 virtual void append(sp<SystemI> a_system);
35 
36 virtual void setDT(t_moa_real a_dt);
37 virtual t_moa_real getDT(void);
38 virtual t_moa_real getTime(void);
39 
40 virtual void step(const t_step_mode &a_step_mode, t_moa_real a_time);
41 
42 virtual sp<RecordGroup> dataset(void) { return rg_dataset; }
43 
44 virtual t_note_id connect(t_note_perform a_perform, const char *a_label);
45 
46  private:
47  sp<RecordGroup> rg_dataset;
48 
49  private:
50  typedef std::vector< sp<SystemI> > t_system_array;
51 
52  typedef std::vector< sp<SystemI> > t_systems;
53  t_systems m_systems;
54 
55  std::map<String, t_note_id> m_note_map;
56 
57  t_note_id m_note_step;
58  t_note_id m_note_compile;
59  t_note_id m_note_dt_change;
60 
61  typedef std::vector< t_note_perform > t_perform_array;
62  typedef std::vector< t_perform_array > t_note_array;
63  t_note_array m_note_array;
64 
65  AsTime m_asTime;
66  Record m_r_time;
67 };
68 
69 } /* namespace ext */
70 } /* namespace fe */
71 
72 #endif /* __moa_Orchestrator_h__ */
73 
Orchestrate signalling of SystemI components.
Definition: OrchestratorI.h:28
virtual void perform(const char *a_label)
Signal SystemI&#39;s appended on matching id.
Definition: Orchestrator.h:27
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Clock.
Definition: moaAS.h:104
t_step_mode
Definition: OrchestratorI.h:18
virtual sp< RecordGroup > dataset(void)
Get the dataset.
Definition: Orchestrator.h:42
Basic OrchestratorI implementation.
Definition: Orchestrator.h:16
Reference to an instance of a Layout.
Definition: RecordSB.h:35
System Interface for MOA.
Definition: SystemI.h:18