CModelBinderComp.h
Go to the documentation of this file.
1 #ifndef ibase_CModelBinderComp_included
2 #define ibase_CModelBinderComp_included
3 
4 
5 // ACF includes
6 #include <imod/IModel.h>
7 #include <imod/IObserver.h>
8 #include <icomp/CComponentBase.h>
9 
10 
11 namespace ibase
12 {
13 
14 
27 {
28 public:
30 
31  I_BEGIN_COMPONENT(CModelBinderComp);
32  I_ASSIGN(m_modelCompPtr, "Model", "Model to be connected", true, "Model");
33  I_ASSIGN_MULTI_0(m_observersCompPtr, "Observers", "Observers for the model", true);
34  I_END_COMPONENT;
35 
36 protected:
37  // reimplemented (icomp::CComponentBase)
38  virtual void OnComponentCreated();
39  virtual void OnComponentDestroyed();
40 
41 private:
45  I_REF(imod::IModel, m_modelCompPtr);
46 
50  I_MULTIREF(imod::IObserver, m_observersCompPtr);
51 };
52 
53 
54 } // namespace ibase
55 
56 
57 #endif // !ibase_CModelBinderComp_included
58 
59 
Base class for component implementation.
virtual void OnComponentDestroyed()
virtual void OnComponentCreated()
Implementation of a simple model-observer binder component.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition: IObserver.h:24
Common interface for model objects, that supports Model/Observer design pattern.
Definition: IModel.h:23
icomp::CComponentBase BaseClass

© 2007-2017 Witold Gantzke and Kirill Lepskiy