Free Electron
PlanHandler.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 __plan_PlanHandler_h__
8 #define __plan_PlanHandler_h__
9 
10 #include "signal/signal.h"
11 #include "shape/shape.h"
12 
13 #include "plan/MethodI.h"
14 #include "plan/planAS.h"
15 #include "ai/aiAS.h"
16 
17 namespace fe
18 {
19 
20 /** Processes plans.
21 
22  The ops in the group for each AsPlan record is processed with the
23  matching registered MethodI.
24 
25  Interprets a true return of MethodI::method() to mean the op
26  is complete. In this case the op is removed from the group.
27 
28  */
29 class FE_DL_EXPORT PlanHandler :
30  virtual public HandlerI,
31  virtual public Dispatch,
32  virtual public Config,
33  virtual public Initialize<PlanHandler>
34 {
35  public:
36  PlanHandler(void);
37 virtual ~PlanHandler(void);
38 virtual void initialize(void);
39 
40  // AS HandlerI
41 virtual void handle(Record &r_sig);
42 
43  // AS DispatchI
44 virtual bool call(const String &a_name, std::vector<Instance> a_argv);
45 
46 
47 virtual void method(sp<Layout> spLayout, sp<MethodI> spMethod);
48 
49 
50  private:
51  typedef std::map<sp<Layout>, sp<MethodI> > t_map;
52 
53  AsPlan m_asPlan;
54  t_map m_map;
55 };
56 
57 } /* namespace */
58 
59 #endif /* __plan_PlanHandler_h__ */
60 
61 
62 
Processes plans.
Definition: PlanHandler.h:29
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Automatically reference-counted string container.
Definition: String.h:128
Reference to an instance of a Layout.
Definition: RecordSB.h:35