CVariableParamComp.h
Go to the documentation of this file.
1 #ifndef iprm_CVariableParamComp_included
2 #define iprm_CVariableParamComp_included
3 
4 
5 // ACF includes
7 #include <icomp/CComponentBase.h>
8 #include <iprm/IVariableParam.h>
9 
10 
11 namespace iprm
12 {
13 
14 
16  public icomp::CComponentBase,
17  virtual public IVariableParam
18 {
19 public:
21 
22  I_BEGIN_COMPONENT(CVariableParamComp);
23  I_REGISTER_INTERFACE(iser::ISerializable);
24  I_REGISTER_INTERFACE(IVariableParam);
25  I_ASSIGN_MULTI_0(m_factoriesFact, "Factories", "List of factories for each type", true);
26  I_ASSIGN_MULTI_0(m_factoryIdsAttrPtr, "TypeIds", "List of factory ID for each factory object", true);
27  I_END_COMPONENT;
28 
30 
31  // reimplemented (iprm::IVariableParam)
32  virtual TypeIds GetKnownTypeIds() const;
33  virtual QByteArray GetParameterTypeId() const;
34  virtual iser::ISerializable* GetParameter() const;
35  virtual bool AssignTypeId(const QByteArray& typeId);
36 
37  // reimplemented (iser::ISerializable)
38  virtual bool Serialize(iser::IArchive& archive);
39  virtual quint32 GetMinimalVersion(int versionId) const;
40 
41 private:
42  I_MULTIFACT(iser::ISerializable, m_factoriesFact);
43  I_MULTIATTR(QString, m_factoryIdsAttrPtr);
44 
45  QByteArray m_paramTypeId;
47 
48  imod::CModelUpdateBridge m_updateBridge;
49 };
50 
51 
52 } // namespace iprm
53 
54 
55 #endif // !iprm_CVariableParamComp_included
56 
57 
virtual bool AssignTypeId(const QByteArray &typeId)
Assign type ID to this object.
Base class for component implementation.
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
QSet< QByteArray > TypeIds
Represent input/output persistence archive.
Definition: IArchive.h:30
virtual iser::ISerializable * GetParameter() const
Get current parameter.
virtual QByteArray GetParameterTypeId() const
Get type ID of current stored parameter.
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
virtual quint32 GetMinimalVersion(int versionId) const
Get minimal needed version to correct storing of this data.
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable), typically delegated to itself.
virtual TypeIds GetKnownTypeIds() const
Get lilst of all known type ID's.
Represents parameter, which can change its type.
icomp::CComponentBase BaseClass

© 2007-2017 Witold Gantzke and Kirill Lepskiy