ICF 3.1.1.10
Technical documentation of ICF Libraries
CVariableParamComp.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_CVariableParamComp_included
7#define iprm_CVariableParamComp_included
8
9
10// ICF includes
13#include <iprm/IVariableParam.h>
14
15
16namespace iprm
17{
18
19
22 virtual public IVariableParam
23{
24public:
26
27 I_BEGIN_COMPONENT(CVariableParamComp);
28 I_REGISTER_INTERFACE(iser::ISerializable);
29 I_REGISTER_INTERFACE(IVariableParam);
30 I_ASSIGN_MULTI_0(m_factoriesFact, "Factories", "List of factories for each type", true);
31 I_ASSIGN_MULTI_0(m_factoryIdsAttrPtr, "TypeIds", "List of factory ID for each factory object", true);
32 I_END_COMPONENT;
33
35
36 // reimplemented (iprm::IVariableParam)
37 TypeIds GetKnownTypeIds() const override;
38 QByteArray GetParameterTypeId() const override;
40 bool AssignTypeId(const QByteArray& typeId) override;
41
42 // reimplemented (iser::ISerializable)
43 bool Serialize(iser::IArchive& archive) override;
44 quint32 GetMinimalVersion(int versionId) const override;
45
46private:
47 I_MULTIFACT(iser::ISerializable, m_factoriesFact);
48 I_MULTIATTR(QString, m_factoryIdsAttrPtr);
49
50 QByteArray m_paramTypeId;
51 std::unique_ptr<iser::ISerializable> m_paramPtr;
52
53 imod::CModelUpdateBridge m_updateBridge;
54};
55
56
57} // namespace iprm
58
59
60#endif // !iprm_CVariableParamComp_included
61
62
Base class for component implementation.
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable),...
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
iser::ISerializable * GetParameter() const override
Get current parameter.
quint32 GetMinimalVersion(int versionId) const override
Get minimal needed version to correct storing of this data.
bool AssignTypeId(const QByteArray &typeId) override
Assign type ID to this object.
TypeIds GetKnownTypeIds() const override
Get lilst of all known type ID's.
QByteArray GetParameterTypeId() const override
Get type ID of current stored parameter.
icomp::CComponentBase BaseClass
Represents parameter, which can change its type.
QSet< QByteArray > TypeIds
Represent input/output persistence archive.
Definition IArchive.h:34
Common class for all classes which objects can be archived or restored from archive.
Contains interfaces and implementations of flexible parameter concept.

© Witold Gantzke and Kirill Lepskiy