CSimpleShapeFactoryComp.h
Go to the documentation of this file.
1 #ifndef iview_CSimpleShapeFactoryComp_included
2 #define iview_CSimpleShapeFactoryComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 #include <iview/IShapeFactory.h>
8 #include <iview/IColorSchema.h>
10 
11 
12 namespace iview
13 {
14 
15 
20  public icomp::CComponentBase,
21  virtual public IShapeFactory
22 {
23 public:
25 
26  I_BEGIN_COMPONENT(CSimpleShapeFactoryComp);
27  I_REGISTER_INTERFACE(IShapeFactory);
28  I_ASSIGN(m_useInteractiveShapesAttrPtr, "UseInteractiveShapes", "If true, the created shapes will be editable", true, true);
29  I_ASSIGN(m_colorSchemaCompPtr, "ShapeColorSchema", "Color schema used by displayed shape", false, "ShapeColorSchema");
30  I_END_COMPONENT;
31 
32  // reimplemented (iview::IShapeFactory)
33  virtual IShape* CreateShape(const istd::IChangeable* objectPtr, bool connectToModel = false) const;
34 
35 protected:
36  virtual CShapeBase* CreateShapeInstance(const istd::IChangeable& object) const;
37 
38 protected:
39  I_ATTR(bool, m_useInteractiveShapesAttrPtr);
40  I_REF(iview::IColorSchema, m_colorSchemaCompPtr);
41 };
42 
43 
44 } // namespace iview
45 
46 
47 #endif // !iview_CSimpleShapeFactoryComp_included
48 
49 
virtual CShapeBase * CreateShapeInstance(const istd::IChangeable &object) const
Base class for component implementation.
virtual IShape * CreateShape(const istd::IChangeable *objectPtr, bool connectToModel=false) const
Create a graphical representation of the given 2D-object object.
Simple shape factory for common 2D-objects.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
Common interface for all display console shapes.
Definition: IShape.h:27
Interface for creation of visualization shapes of some geometrical object.
Definition: IShapeFactory.h:18
Defines set of standard pens, brushes and simple management of unions.
Definition: IColorSchema.h:28

© 2007-2017 Witold Gantzke and Kirill Lepskiy