CComposedParamsSetComp.h
Go to the documentation of this file.
1 #ifndef iprm_CComposedParamsSetComp_included
2 #define iprm_CComposedParamsSetComp_included
3 
4 
5 // ACF includes
6 #include <istd/TIHierarchical.h>
7 #include <icomp/CComponentBase.h>
8 #include <iprm/CParamsSet.h>
9 
10 
11 namespace iprm
12 {
13 
14 
20  public icomp::CComponentBase,
21  public CParamsSet,
22  virtual public istd::IHierarchical
23 {
24 public:
27 
28  I_BEGIN_COMPONENT(CComposedParamsSetComp);
29  I_REGISTER_INTERFACE(istd::IHierarchical);
30  I_REGISTER_INTERFACE(iser::ISerializable);
31  I_REGISTER_INTERFACE(IParamsSet);
32  I_ASSIGN_MULTI_0(m_slaveParamsCompPtr, "SlaveSets", "List of slave parameter sets", false);
33  I_ASSIGN_MULTI_0(m_parametersCompPtr, "Parameters", "Parameters", true);
34  I_ASSIGN_MULTI_0(m_parametersIdAttrPtr, "ParametersId", "ID of each paremeter in 'Parameters'", true);
35  I_ASSIGN(m_typeIdAttrPtr, "TypeId", "ID of this parameter set", true, "Default");
36  I_END_COMPONENT;
37 
38  // reimplemented (iprm::IParamsSet)
39  virtual Ids GetParamIds(bool editableOnly = false) const;
40  virtual const iser::ISerializable* GetParameter(const QByteArray& id) const;
41 
42  // reimplemented (istd::IHierarchical)
43  virtual int GetHierarchicalFlags() const;
44  virtual int GetChildsCount() const;
45  virtual istd::IPolymorphic* GetChild(int index) const;
46  virtual istd::IPolymorphic* GetParent() const;
47 
48  // reimplemented (istd::IChangeable)
49  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
50 
51 protected:
52  iprm::IParamsSet* GetSlaveParamsSet(int index) const;
53  int GetSlaveParamsSetCount() const;
54 
55  // reimplemented (icomp::CComponentBase)
56  virtual void OnComponentCreated();
57 
58 private:
59  I_MULTIREF(IParamsSet, m_slaveParamsCompPtr);
60  I_MULTIREF(iser::ISerializable, m_parametersCompPtr);
61  I_MULTIATTR(QByteArray, m_parametersIdAttrPtr);
62  I_ATTR(QByteArray, m_typeIdAttrPtr);
63 };
64 
65 
66 } // namespace iprm
67 
68 
69 #endif // !iprm_CComposedParamsSetComp_included
QSet< QByteArray > Ids
Definition: IParamsSet.h:26
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
Implementation of interface IParamsSet as component.
virtual istd::IPolymorphic * GetParent() const
Get access to parent object.
virtual int GetHierarchicalFlags() const
Get flags describing supported features of this hierarchical graph.
Base class for component implementation.
virtual void OnComponentCreated()
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
int GetSlaveParamsSetCount() const
virtual istd::IPolymorphic * GetChild(int index) const
Get child value.
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
iprm::IParamsSet * GetSlaveParamsSet(int index) const
virtual const iser::ISerializable * GetParameter(const QByteArray &id) const
Get any parameter.
virtual Ids GetParamIds(bool editableOnly=false) const
Get list of used parameter IDs in the parameter set.
Common interface to define the hierarchical graph structures.
Basic implementation of interface IParamsSet.
Definition: CParamsSet.h:22
Set of general parameters.
Definition: IParamsSet.h:23
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
virtual int GetChildsCount() const
Get number of childs.

© 2007-2017 Witold Gantzke and Kirill Lepskiy