ICF 3.0.5.47
Technical documentation of ICF Libraries
TModelCompWrap.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#include <istd/IChangeable.h>
10
11#include <imod/TModelWrap.h>
12
15
16
17namespace icomp
18{
19
20
26template <class Base>
27class TModelCompWrap: public TComponentCloneWrap<imod::TModelWrap<Base> >
28{
29public:
31
32 I_BEGIN_COMPONENT(TModelCompWrap);
33 I_REGISTER_INTERFACE(istd::IChangeable);
34 I_REGISTER_INTERFACE(imod::IModel);
35 I_END_COMPONENT;
36
37protected:
38 // reimplemented (icomp::CComponentBase)
39 void OnComponentDestroyed() override;
40};
41
42
43// protected methods
44
45// reimplemented (icomp::CComponentBase)
46
47template <class Base>
49{
51
52 BaseClass::OnComponentDestroyed();
53}
54
55
56} // namespace icomp
57
58
Makes component and model from some class implementing interface istd::IChangeable.
void OnComponentDestroyed() override
TComponentCloneWrap< imod::TModelWrap< Base > > BaseClass
virtual void DetachAllObservers()
Detaches all attached observers.
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:29
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Package with interfaces and class used for components concept.

© Witold Gantzke and Kirill Lepskiy