Free Electron
Executor.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 __architecture_Executor_h__
8 #define __architecture_Executor_h__
9 
10 #include <datatool/datatool.h>
11 
12 namespace fe
13 {
14 namespace ext
15 {
16 
17 /**************************************************************************//**
18  @brief Executor RecordView
19 
20  @ingroup architecture
21 *//***************************************************************************/
22 class FE_DL_EXPORT Executor:
23  virtual public Recordable,
24  virtual public RecordableI,
25  virtual public ApplicationI
26 {
27  public:
28  Functor< Array<String> > pluginList;
30  Functor<String> pipeline;
31 
32  Executor(void);
33 virtual ~Executor(void);
34 
35 virtual void addFunctors(void)
36  {
38 
39  add(pluginList, FE_SPEC("plug:list",
40  "array of plugin dynamic libraries to preload"));
41  add(catalogMap, FE_SPEC("cat:map",
42  "store of catalog entry pairs"));
43  add(pipeline, FE_SPEC("arch:pipe",
44  "architecture pipeline filename"));
45  }
46 virtual void initializeRecord(void)
47  {
49  }
50 virtual void finalizeRecord(void)
51  {
53  }
54 
55  //* as RecordableI
56 virtual void bind(Record& record);
57 
58  //* as ApplicationI
59 virtual void setup(int a_argc, char **a_argv, char** a_env);
60 virtual bool step(int &a_returnCode);
61 virtual bool loop(int &a_returnCode);
62 
63  void resolve(void);
64 
65  protected:
66  sp<RecordGroup> m_spPipeline;
67  sp<SignalerI> m_spSignalerI;
68  sp<Layout> m_spHeartbeat;
69  Record m_heartbeat;
70 
71  private:
72  void populateSignaler(void);
73  void loadPlugins(void);
74  void restoreCatalog(void);
75  void storeCatalog(void);
76 };
77 
78 } /* namespace ext */
79 } /* namespace fe */
80 
81 #endif /* __architecture_Executor_h__ */
application framework interface
Definition: ApplicationI.h:16
virtual void finalizeRecord(void)
Called right after instantiation to finalize complex attributes.
Definition: Recordable.h:45
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Recordable.h:31
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Executor.h:35
Executor RecordView.
Definition: Executor.h:22
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Recordable.h:37
Generic binding to a serializable state.
Definition: RecordableI.h:20
Reference to an instance of a Layout.
Definition: RecordSB.h:35
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Executor.h:46
Recordable RecordView.
Definition: Recordable.h:23
virtual void finalizeRecord(void)
Called right after instantiation to finalize complex attributes.
Definition: Executor.h:50