ACF $AcfVersion:0$
TModelCompWrap.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
6#include <istd/IChangeable.h>
7#include <imod/TModelWrap.h>
10
11
12namespace icomp
13{
14
15
22template <class Base>
23class TModelCompWrap: public icomp::TComponentCloneWrap<imod::TModelWrap<Base> >
24{
25public:
27
28 I_BEGIN_COMPONENT(TModelCompWrap);
29 I_REGISTER_INTERFACE(istd::IChangeable);
30 I_REGISTER_INTERFACE(imod::IModel);
31 I_END_COMPONENT;
32
33protected:
34 // reimplemented (icomp::CComponentBase)
35 virtual void OnComponentDestroyed() override;
36};
37
38
39// protected methods
40
41// reimplemented (icomp::CComponentBase)
42
43template <class Base>
45{
47
48 BaseClass::OnComponentDestroyed();
49}
50
51
52} // namespace icomp
53
54
Makes component and model from some class implementing interface istd::IChangeable.
icomp::TComponentCloneWrap< imod::TModelWrap< Base > > BaseClass
virtual void OnComponentDestroyed() override
virtual void DetachAllObservers() override
Detaches all attached observers.
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:25
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
Package with interfaces and class used for components concept.