CSelectionParamComp.h
Go to the documentation of this file.
1 #ifndef iprm_CSelectionParamComp_included
2 #define iprm_CSelectionParamComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 
8 #include <iprm/IOptionsList.h>
9 #include <iprm/CSelectionParam.h>
10 
11 
12 namespace iprm
13 {
14 
15 
20  public icomp::CComponentBase,
21  public CSelectionParam
22 {
23 public:
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;
37 
38 protected:
39  // reimplemented (icomp::CComponentBase)
40  virtual void OnComponentCreated();
41 
42 private:
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 #endif // !iprm_CSelectionParamComp_included
53 
Base class for component implementation.
Constraints of selection from set of possibilities.
Definition: IOptionsList.h:22
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
virtual ISelectionParam * GetSubselection(int index) const
Get subselection for specified option.
icomp::CComponentBase BaseClass
Component level implementation of selection parameter.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
Basic implementation of selection parameter.
virtual void OnComponentCreated()
Interface allowing to select single option from list of options.

© 2007-2017 Witold Gantzke and Kirill Lepskiy