ICF 3.1.1.10
Technical documentation of ICF Libraries
CManagerParamsSetShadowerComp.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 iprm_CManagerParamsSetShadowerComp_included
7#define iprm_CManagerParamsSetShadowerComp_included
8
9
10// ICF includes
13#include <iprm/IOptionsList.h>
14#include <iprm/IParamsSet.h>
16#include <iprm/IParamsManager.h>
17
18
19namespace iprm
20{
21
22
29{
30public:
33
34 I_BEGIN_COMPONENT(CManagerParamsSetShadowerComp);
35 I_ASSIGN(m_paramsManagerCompPtr, "ParamsManager", "Manager of parameter set used to realize selection", true, "ParamsManager");
36 I_ASSIGN_TO(m_paramsManagerModelCompPtr, m_paramsManagerCompPtr, true);
37 I_ASSIGN(m_selectionParamCompPtr, "SelectionParam", "Selection parameter choising some object in parameter manager", true, "SelectionParam");
38 I_ASSIGN(m_shadowParamsSetCompPtr, "ShadowParamsSet", "Shadow parameter set where current selected set will be copied", true, "ShadowParamsSet");
39 I_END_COMPONENT;
40
42
43protected:
53
54 // reimplemented (icomp::CComponentBase)
55 void OnComponentCreated() override;
56 void OnComponentDestroyed() override;
57
58 // reimplemented (imod::CMultiModelDispatcherBase)
59 void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet) override;
60
61private:
62 imod::IModel* m_currentParamsModelPtr;
63
64 I_REF(IParamsManager, m_paramsManagerCompPtr);
65 I_REF(imod::IModel, m_paramsManagerModelCompPtr);
66 I_REF(ISelectionParam, m_selectionParamCompPtr);
67 I_REF(IParamsSet, m_shadowParamsSetCompPtr);
68};
69
70
71} // namespace iprm
72
73
74#endif // !iprm_CManagerParamsSetShadowerComp_included
75
76
Base class for component implementation.
Generic implementation of a data model changes notifier.
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:29
Keep parameter set with selected one synchronized.
bool CopyParamsSetToShadow()
Do copy current selected parameter set to shadow object.
void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet) override
Called when some model observed by dispatcher will be changed.
Manager of parameters set.
Set of general parameters.
Definition IParamsSet.h:29
Interface allowing to select single option from list of options.
Set of change flags (its IDs).
Definition IChangeable.h:38
Contains interfaces and implementations of flexible parameter concept.

© Witold Gantzke and Kirill Lepskiy