ICF 3.0.5.47
Technical documentation of ICF Libraries
TShapeCompWrap.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#pragma once
7
8
9// ICF includes
12#include <iview/CShapeBase.h>
13
14
15namespace iview
16{
17
18
22template <class Base>
23class TShapeCompWrap: public ibase::TModelObserverCompBaseWrap< icomp::TMakeComponentWrap<
24 Base,
25 iview::CShapeBase,
26 iview::IShape,
27 imod::IObserver,
28 iview::IVisualizable,
29 iview::ITouchable> >
30{
31public:
33 Base,
39
40 I_BEGIN_COMPONENT(TShapeCompWrap);
41 I_ASSIGN(m_layerTypeAttrPtr, "LayerType", "Type of laye:\n\t0-auto\n\t1-background\n\t2-inactive\n\t3-active\n\t4-calibration\n\t5-tools", false, 0);
42 I_END_COMPONENT;
43
44protected:
45 // reimplemented (icomp::CComponentBase)
46 void OnComponentCreated() override;
47
48private:
49 I_ATTR(int, m_layerTypeAttrPtr);
50};
51
52
53// protected methods
54
55// reimplemented (icomp::CComponentBase)
56
57template <class Base>
59{
60 BaseClass::OnComponentCreated();
61
62 if (m_layerTypeAttrPtr != nullptr) {
63 Base::AssignToLayer(*m_layerTypeAttrPtr);
64 }
65}
66
67
68} // namespace iview
69
70
Generic basic implementation of component wrapper for model observer classes.
Simple wrapper making component from non-component class.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition IObserver.h:30
Base class of standard shape implementation.
Definition CShapeBase.h:34
Common interface for all display console shapes.
Definition IShape.h:37
This interface describes all untransparent GUI objects, which can be touched.
Definition ITouchable.h:23
Cretion of component wrapper for shape classes.
void OnComponentCreated() override
ibase::TModelObserverCompBaseWrap< icomp::TMakeComponentWrap< Base, iview::CShapeBase, iview::IShape, imod::IObserver, iview::IVisualizable, iview::ITouchable > > BaseClass
In this library is defined 2D view concept and standard visualisation objects.

© Witold Gantzke and Kirill Lepskiy