ICF 3.1.1.10
Technical documentation of ICF Libraries
CModelBinderComp.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
10#include <imod/IModel.h>
11#include <imod/IObserver.h>
13
14
15namespace ibase
16{
17
18
31{
32public:
34
35 I_BEGIN_COMPONENT(CModelBinderComp);
36 I_ASSIGN(m_modelCompPtr, "Model", "Model to be connected", true, "Model");
37 I_ASSIGN_MULTI_0(m_observersCompPtr, "Observers", "Observers for the model", true);
38 I_END_COMPONENT;
39
40protected:
41 // reimplemented (icomp::CComponentBase)
42 void OnComponentCreated() override;
43 void OnComponentDestroyed() override;
44
45private:
49 I_REF(imod::IModel, m_modelCompPtr);
50
54 I_MULTIREF(imod::IObserver, m_observersCompPtr);
55};
56
57
58} // namespace ibase
59
60
Implementation of a simple model-observer binder component.
void OnComponentDestroyed() override
void OnComponentCreated() override
icomp::CComponentBase BaseClass
Base class for component implementation.
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:29
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition IObserver.h:30
This namespace contains standard classes based on Qt.

© Witold Gantzke and Kirill Lepskiy