ICF 3.0.5.47
Technical documentation of ICF Libraries
CSelectionParamComp.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_CSelectionParamComp_included
7#define iprm_CSelectionParamComp_included
8
9
10// ICF includes
12
13#include <iprm/IOptionsList.h>
15
16
17namespace iprm
18{
19
20
26 public CSelectionParam
27{
28public:
30
31 I_BEGIN_COMPONENT(CSelectionParamComp);
32 I_REGISTER_INTERFACE(istd::IChangeable);
33 I_REGISTER_INTERFACE(iser::ISerializable);
34 I_REGISTER_INTERFACE(ISelectionParam);
35 I_ASSIGN(m_constraintsCompPtr, "Constraints", "Constraints describing allowed value ranges", false, "Constraints");
36 I_ASSIGN(m_subselectionCompPtr, "Subselection", "Subselection object", false, "Subselection");
37 I_ASSIGN(m_defaultIndexAttrPtr, "DefaultIndex", "Default value of selected index, or -1 for no selection", true, -1);
38 I_END_COMPONENT;
39
40 // reimplemented (iprm::ISelectionParam)
41 ISelectionParam* GetSubselection(int index) const override;
42
43protected:
44 // reimplemented (icomp::CComponentBase)
45 void OnComponentCreated() override;
46
47private:
48 I_REF(IOptionsList, m_constraintsCompPtr);
49 I_REF(ISelectionParam, m_subselectionCompPtr);
50 I_ATTR(int, m_defaultIndexAttrPtr);
51};
52
53
54} // namespace iprm
55
56
57#endif // !iprm_CSelectionParamComp_included
58
Base class for component implementation.
Component level implementation of selection parameter.
void OnComponentCreated() override
icomp::CComponentBase BaseClass
ISelectionParam * GetSubselection(int index) const override
Get subselection for specified option.
Basic implementation of selection parameter.
Constraints of selection from set of possibilities.
Interface allowing to select single option from list of options.
Common class for all classes which objects can be archived or restored from archive.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Contains interfaces and implementations of flexible parameter concept.

© Witold Gantzke and Kirill Lepskiy