ACF $AcfVersion:0$
CSelectionParamComp.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
7
8#include <iprm/IOptionsList.h>
10
11
12namespace iprm
13{
14
15
21 public CSelectionParam
22{
23public:
25
26 I_BEGIN_COMPONENT(CSelectionParamComp);
27 I_REGISTER_INTERFACE(istd::IChangeable);
28 I_REGISTER_INTERFACE(iser::ISerializable);
29 I_REGISTER_INTERFACE(ISelectionParam);
30 I_ASSIGN(m_constraintsCompPtr, "Constraints", "Constraints describing allowed value ranges", false, "Constraints");
31 I_ASSIGN(m_subselectionCompPtr, "Subselection", "Subselection object", false, "Subselection");
32 I_ASSIGN(m_defaultIndexAttrPtr, "DefaultIndex", "Default value of selected index, or -1 for no selection", true, -1);
33 I_END_COMPONENT;
34
35 // reimplemented (iprm::ISelectionParam)
36 virtual ISelectionParam* GetSubselection(int index) const override;
37
38protected:
39 // reimplemented (icomp::CComponentBase)
40 virtual void OnComponentCreated() override;
41
42private:
43 I_REF(IOptionsList, m_constraintsCompPtr);
44 I_REF(ISelectionParam, m_subselectionCompPtr);
45 I_ATTR(int, m_defaultIndexAttrPtr);
46};
47
48
49} // namespace iprm
50
51
52
Base class for component implementation.
Component level implementation of selection parameter.
virtual ISelectionParam * GetSubselection(int index) const override
Get sub-selection for specified option.
icomp::CComponentBase BaseClass
virtual void OnComponentCreated() override
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:28
Contains interfaces and implementations of flexible parameter concept.