ICF 3.1.1.10
Technical documentation of ICF Libraries
CSimpleShapeFactoryComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iview_CSimpleShapeFactoryComp_included
7#define iview_CSimpleShapeFactoryComp_included
8
9
10// ICF includes
12#include <iview/IShapeFactory.h>
13#include <iview/IColorSchema.h>
15
16
17namespace iview
18{
19
20
26 virtual public IShapeFactory
27{
28public:
30
31 I_BEGIN_COMPONENT(CSimpleShapeFactoryComp);
32 I_REGISTER_INTERFACE(IShapeFactory);
33 I_ASSIGN(m_useInteractiveShapesAttrPtr, "UseInteractiveShapes", "If true, the created shapes will be editable", true, true);
34 I_ASSIGN(m_colorSchemaCompPtr, "ShapeColorSchema", "Color schema used by displayed shape", false, "ShapeColorSchema");
35 I_END_COMPONENT;
36
37 // reimplemented (iview::IShapeFactory)
38 std::unique_ptr<iview::IShape> CreateShape(const istd::IChangeable* objectPtr, bool connectToModel = false) const override;
39
40protected:
41 virtual std::unique_ptr<IShape> CreateShapeInstance(const istd::IChangeable& object) const;
42
43protected:
44 I_ATTR(bool, m_useInteractiveShapesAttrPtr);
45 I_REF(iview::IColorSchema, m_colorSchemaCompPtr);
46};
47
48
49} // namespace iview
50
51
52#endif // !iview_CSimpleShapeFactoryComp_included
53
54
Base class for component implementation.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Simple shape factory for common 2D-objects.
std::unique_ptr< iview::IShape > CreateShape(const istd::IChangeable *objectPtr, bool connectToModel=false) const override
Create a graphical representation of the given 2D-object object.
virtual std::unique_ptr< IShape > CreateShapeInstance(const istd::IChangeable &object) const
Defines set of standard pens, brushes and simple management of unions.
Interface for creation of visualization shapes of some geometrical object.
In this library is defined 2D view concept and standard visualisation objects.

© Witold Gantzke and Kirill Lepskiy