TModelCompWrap.h
Go to the documentation of this file.
1 #ifndef imod_TModelCompWrap_included
2 #define imod_TModelCompWrap_included
3 
4 
5 #include <istd/IChangeable.h>
6 
7 #include <imod/TModelWrap.h>
8 
10 #include <icomp/CComponentBase.h>
11 
12 
13 namespace icomp
14 {
15 
16 
23 template <class Base>
24 class TModelCompWrap: public icomp::TComponentCloneWrap<imod::TModelWrap<Base> >
25 {
26 public:
28 
29  I_BEGIN_COMPONENT(TModelCompWrap);
30  I_REGISTER_INTERFACE(istd::IChangeable);
31  I_REGISTER_INTERFACE(imod::IModel);
32  I_END_COMPONENT;
33 
34 protected:
35  // reimplemented (icomp::CComponentBase)
36  virtual void OnComponentDestroyed();
37 };
38 
39 
40 // protected methods
41 
42 // reimplemented (icomp::CComponentBase)
43 
44 template <class Base>
46 {
48 
49  BaseClass::OnComponentDestroyed();
50 }
51 
52 
53 } // namespace icomp
54 
55 
56 #endif // !imod_TModelCompWrap_included
57 
58 
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
virtual void DetachAllObservers()
Detaches all attached observers.
Makes component and model from some class implementing interface istd::IChangeable.
Common interface for model objects, that supports Model/Observer design pattern.
Definition: IModel.h:23
virtual void OnComponentDestroyed()
icomp::TComponentCloneWrap< imod::TModelWrap< Base > > BaseClass

© 2007-2017 Witold Gantzke and Kirill Lepskiy