CAnnulusComp.h
Go to the documentation of this file.
1 #ifndef i2d_CAnnulusComp_included
2 #define i2d_CAnnulusComp_included
3 
4 
5 // ACF includes
7 #include <i2d/CAnnulus.h>
8 
9 
10 namespace i2d
11 {
12 
13 
18 class CAnnulusComp: public TObject2dCompWrap<CAnnulus>
19 {
20 public:
22 
23  I_BEGIN_COMPONENT(CAnnulusComp);
24  I_REGISTER_INTERFACE(i2d::CAnnulus);
25  I_REGISTER_INTERFACE(CPosition2d);
26  I_ASSIGN(m_centerXAttrPtr, "X", "X-Position of the annulus center", true, 0);
27  I_ASSIGN(m_centerYAttrPtr, "Y", "X-Position of the annulus center", true, 0);
28  I_ASSIGN(m_innerRadiusAttrPtr, "InnerRadius", "Inner radius of the annulus", true, 0);
29  I_ASSIGN(m_outerRadiusAttrPtr, "OuterRadius", "Outer radius of the annulus", true, 0);
30  I_END_COMPONENT;
31 
32 protected:
33  // reimplemented (icomp::CComponentBase)
34  virtual void OnComponentCreated();
35 
36  // reimplemented (istd::IChangeable)
37  virtual bool ResetData(CompatibilityMode mode = CM_WITHOUT_REFS);
38 
39 private:
40  I_ATTR(double, m_centerXAttrPtr);
41  I_ATTR(double, m_centerYAttrPtr);
42  I_ATTR(double, m_innerRadiusAttrPtr);
43  I_ATTR(double, m_outerRadiusAttrPtr);
44 };
45 
46 
47 } // namespace i2d
48 
49 
50 #endif // !i2d_CAnnulusComp_included
51 
52 
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
Definition of graphical annulus object.
Definition: CAnnulus.h:19
virtual bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS)
Reset data to its default state.
virtual void OnComponentCreated()
TObject2dCompWrap< CAnnulus > BaseClass
Definition: CAnnulusComp.h:21
Base class for all components implementing 2D objects.
Implementation of an annulus as a component.
Definition: CAnnulusComp.h:18
Definition of graphical point object.
Definition: CPosition2d.h:17

© 2007-2017 Witold Gantzke and Kirill Lepskiy