ACF $AcfVersion:0$
CComposedParamsSetComp.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
8#include <iprm/CParamsSet.h>
10
11
12namespace iprm
13{
14
15
22 public CParamsSet,
23 virtual public istd::IHierarchical,
24 virtual public IParamsInfoProvider
25{
26public:
29
30 I_BEGIN_COMPONENT(CComposedParamsSetComp);
31 I_REGISTER_INTERFACE(istd::IHierarchical);
32 I_REGISTER_INTERFACE(iser::ISerializable);
33 I_REGISTER_INTERFACE(IParamsSet);
34 I_REGISTER_INTERFACE(IParamsInfoProvider);
35 I_ASSIGN_MULTI_0(m_slaveParamsCompPtr, "SlaveSets", "List of slave parameter sets", false);
36 I_ASSIGN_MULTI_0(m_parametersCompPtr, "Parameters", "Parameters", true);
37 I_ASSIGN_MULTI_0(m_parametersIdAttrPtr, "ParametersId", "ID of each parameter in 'Parameters'", true);
38 I_ASSIGN_MULTI_0(m_parameterNameAttrPtr, "ParametersName", "Name of each parameter in 'Parameters'", true);
39 I_ASSIGN_MULTI_0(m_parameterDescriptionAttrPtr, "ParametersDescription", "Description of each parameter in 'Parameters'", true);
40 I_ASSIGN(m_typeIdAttrPtr, "TypeId", "ID of this parameter set", true, "Default");
41 I_END_COMPONENT;
42
43 // reimplemented (iprm::IParamsSet)
44 virtual Ids GetParamIds(bool editableOnly = false) const override;
45 virtual const iser::ISerializable* GetParameter(const QByteArray& id) const override;
46 virtual const IParamsInfoProvider* GetParamsInfoProvider() const override;
47
48 // reimplemented (iprm::IParamsInfoProvider)
49 virtual std::unique_ptr<ParamInfo> GetParamInfo(const QByteArray& paramId) const override;
50
51 // reimplemented (istd::IHierarchical)
52 virtual int GetHierarchicalFlags() const override;
53 virtual int GetChildsCount() const override;
54 virtual istd::IPolymorphic* GetChild(int index) const override;
55 virtual istd::IPolymorphic* GetParent() const override;
56
57 // reimplemented (istd::IChangeable)
58 virtual int GetSupportedOperations() const override;
59 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
60 virtual bool IsEqual(const IChangeable& object) const override;
61
62protected:
65
66 // reimplemented (icomp::CComponentBase)
67 virtual void OnComponentCreated() override;
68
69private:
70 I_MULTIREF(IParamsSet, m_slaveParamsCompPtr);
71 I_MULTIREF(iser::ISerializable, m_parametersCompPtr);
72 I_MULTIATTR(QByteArray, m_parametersIdAttrPtr);
73 I_MULTIATTR(QString, m_parameterNameAttrPtr);
74 I_MULTIATTR(QString, m_parameterDescriptionAttrPtr);
75 I_ATTR(QByteArray, m_typeIdAttrPtr);
76};
77
78
79} // namespace iprm
80
81
Base class for component implementation.
Implementation of interface IParamsSet as component.
virtual int GetHierarchicalFlags() const override
Get flags describing supported features of this hierarchical graph.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
virtual istd::IPolymorphic * GetParent() const override
Get access to parent object.
virtual istd::IPolymorphic * GetChild(int index) const override
Get child value.
virtual bool IsEqual(const IChangeable &object) const override
virtual Ids GetParamIds(bool editableOnly=false) const override
Get list of used parameter IDs in the parameter set.
virtual const IParamsInfoProvider * GetParamsInfoProvider() const override
Get parameter information provider.
virtual void OnComponentCreated() override
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
virtual int GetChildsCount() const override
Get number of children.
virtual const iser::ISerializable * GetParameter(const QByteArray &id) const override
Get any parameter (read-only access).
virtual std::unique_ptr< ParamInfo > GetParamInfo(const QByteArray &paramId) const override
Get parameter information by parameter ID.
iprm::IParamsSet * GetSlaveParamsSet(int index) const
Basic implementation of interface IParamsSet.
Definition CParamsSet.h:23
Provider of parameter information (name and description).
Set of general parameters.
Definition IParamsSet.h:81
QSet< QByteArray > Ids
Definition IParamsSet.h:83
Common class for all classes which objects can be archived or restored from archive.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Base interface for all used interfaces and implementations.
Common interface to define the hierarchical graph structures.
Contains interfaces and implementations of flexible parameter concept.