TViewExtenderDelegatorCompWrap.h
Go to the documentation of this file.
1 #ifndef iqt2d_TViewExtenderDelegatorCompWrap_included
2 #define iqt2d_TViewExtenderDelegatorCompWrap_included
3 
4 
5 // ACF includes
6 #include <iqt2d/IViewExtender.h>
7 
8 
9 namespace iqt2d
10 {
11 
12 
13 template<class Base>
15  public Base,
16  virtual public iqt2d::IViewExtender
17 {
18 public:
19  typedef Base BaseClass;
20 
21  I_BEGIN_COMPONENT(TViewExtenderDelegatorCompWrap);
22  I_REGISTER_INTERFACE(iqt2d::IViewExtender);
23  I_ASSIGN(m_slaveExtenderCompPtr, "SlaveSceneExtender", "Slave scene extender", false, "SlaveSceneExtender");
24  I_END_COMPONENT;
25 
26  // reimplemented (iqt2d::IViewExtender)
27  virtual void AddItemsToScene(iqt2d::IViewProvider* providerPtr, int flags);
28  virtual void RemoveItemsFromScene(iqt2d::IViewProvider* providerPtr);
29 
30 private:
31  I_REF(iqt2d::IViewExtender, m_slaveExtenderCompPtr);
32 };
33 
34 
35 // reimplemented (iqt2d::IViewExtender)
36 
37 template<class Base>
39 {
40  if (m_slaveExtenderCompPtr.IsValid()){
41  m_slaveExtenderCompPtr->AddItemsToScene(providerPtr, flags);
42  }
43 }
44 
45 
46 template<class Base>
48 {
49  if (m_slaveExtenderCompPtr.IsValid()){
50  m_slaveExtenderCompPtr->RemoveItemsFromScene(providerPtr);
51  }
52 }
53 
54 
56 
57 
58 } // namespace iqt2d
59 
60 
61 #endif // !iqt2d_TViewExtenderDelegatorCompWrap_included
62 
63 
virtual void AddItemsToScene(iqt2d::IViewProvider *providerPtr, int flags)
Called when items should be added to specified scene.
Interface for GUI objects presenting its results using extern view objects.
Definition: IViewExtender.h:19
TViewExtenderDelegatorCompWrap< icomp::CComponentBase > CViewExtenderDelegatorComp
virtual void RemoveItemsFromScene(iqt2d::IViewProvider *providerPtr)
Called when items should be removed from specified scene.
Interface for GUI objects managing view.
Definition: IViewProvider.h:24

© 2007-2017 Witold Gantzke and Kirill Lepskiy