|
ACF $AcfVersion:0$
|
Basic implementation of interface IParamsSet. More...
#include <CParamsSet.h>
Classes | |
| struct | ParameterInfo |
Public Types | |
| typedef istd::TPointerVector< ParameterInfo > | ParameterInfos |
Public Types inherited from iprm::IParamsSet | |
| typedef QSet< QByteArray > | Ids |
Public Types inherited from istd::IChangeable | |
| enum | ChangeFlags { CF_ACF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING , CF_DELEGATED , CF_NO_UNDO } |
| Data model change notification flags. More... | |
| enum | SupportedOperations { SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 , SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4 } |
| Flags for supported operations. More... | |
| enum | CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT } |
| Control how relationship betweeen objects are interpreted. More... | |
| typedef QMultiMap< QByteArray, QVariant > | ChangeInfoMap |
Public Member Functions | |
| CParamsSet (const IParamsSet *slaveSetPtr=NULL) | |
| const IParamsSet * | GetSlaveSet () const |
| Get slave parameter set. | |
| void | SetSlaveSet (const IParamsSet *slaveSetPtr) |
| Set slave parameter set. | |
| virtual bool | SetEditableParameter (const QByteArray &id, iser::ISerializable *parameterPtr, bool releaseFlag=false) |
| Set editable parameter in this set. | |
| virtual bool | SetEditableParameter (const QByteArray &id, iser::ISerializableUniquePtr ¶meterPtr) |
| Set editable parameter in this set. | |
| const ParameterInfos & | GetParameterInfos () const |
| Get access to all parameters. | |
| const QByteArray & | GetParametersTypeId () const |
| Get ID of this parameters type. | |
| void | SetParametersTypeId (const QByteArray &id) |
| Set ID of this parameters type. | |
| virtual QByteArray | GetFactoryId () const override |
| virtual Ids | GetParamIds (bool editableOnly=false) const override |
| Get list of used parameter IDs in the parameter set. | |
| virtual const iser::ISerializable * | GetParameter (const QByteArray &id) const override |
| Get any parameter (read-only access). | |
| virtual iser::ISerializable * | GetEditableParameter (const QByteArray &id) override |
| Get access to editable parameter (read-write access). | |
| virtual const IParamsInfoProvider * | GetParamsInfoProvider () const override |
| Get parameter information provider. | |
| virtual bool | Serialize (iser::IArchive &archive) override |
| Load or store state of this object as a archive stream. | |
| virtual quint32 | GetMinimalVersion (int versionId) const override |
| Get minimal needed version to correct storing of this data. | |
| virtual bool | CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override |
| virtual bool | ResetData (CompatibilityMode mode=CM_WITHOUT_REFS) override |
| Reset data to its default state. | |
Public Member Functions inherited from istd::IChangeable | |
| virtual int | GetSupportedOperations () const |
| Get set of flags for supported operations. | |
| virtual bool | CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) |
| Copy this object from another one. | |
| virtual bool | IsEqual (const IChangeable &object) const |
| Compare this object with another object. | |
| virtual istd::TUniqueInterfacePtr< istd::IChangeable > | CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const |
| Make a copy of this object. | |
| virtual void | BeginChanges (const ChangeSet &changeSet) |
| Starts the change transaction. | |
| virtual void | EndChanges (const ChangeSet &changeSet) |
| Ends the change transaction. | |
| virtual void | BeginChangeGroup (const ChangeSet &changeSet) |
| Starts group of changes. | |
| virtual void | EndChangeGroup (const ChangeSet &changeSet) |
| Ends group of changes. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Protected Member Functions | |
| ParameterInfo * | FindParameterInfo (const QByteArray ¶meterId) const |
Protected Member Functions inherited from istd::IChangeable | |
| virtual void | OnBeginChanges () |
| Callback function for begin change event. | |
| virtual void | OnEndChanges (const ChangeSet &changeSet) |
| Callback function for end change event. | |
Protected Attributes | |
| ParameterInfos | m_params |
| QByteArray | m_paramsTypeId |
| const IParamsSet * | m_slaveSetPtr |
| imod::CModelUpdateBridge | m_updateBridge |
Additional Inherited Members | |
Static Public Member Functions inherited from istd::IChangeable | |
| static const ChangeSet & | GetNoChanges () |
| Get empty set of changes. | |
| static const ChangeSet & | GetAnyChange () |
| Get anonymous change set. | |
| static const ChangeSet & | GetAllChanges () |
| Get anonymous change set. | |
| static const ChangeSet & | GetDelegatedChanges () |
| Get delegated change set. | |
Basic implementation of interface IParamsSet.
Definition at line 22 of file CParamsSet.h.
Definition at line 42 of file CParamsSet.h.
|
explicit |
|
overridevirtual |
Reimplemented in iprm::CComposedParamsSetComp.
|
protected |
|
overridevirtual |
Get access to editable parameter (read-write access).
Retrieves a parameter by its ID for modification. This method returns NULL if the parameter does not exist or is not editable.
| id | ID of parameter. This is an application-specific identifier that uniquely identifies the parameter within this set. |
Implements iprm::IParamsSet.
|
overridevirtual |
Reimplemented from iser::IObject.
|
overridevirtual |
Get minimal needed version to correct storing of this data.
In implementation shold be calculated maximum version of this and composed component.
Reimplemented from iser::ISerializable.
|
overridevirtual |
Get any parameter (read-only access).
Retrieves a parameter by its ID for read-only access. This method returns both editable and non-editable parameters.
| id | ID of parameter. This is an application-specific identifier that uniquely identifies the parameter within this set. |
Implements iprm::IParamsSet.
Reimplemented in iprm::CComposedParamsSetComp.
| const ParameterInfos & iprm::CParamsSet::GetParameterInfos | ( | ) | const |
Get access to all parameters.
| const QByteArray & iprm::CParamsSet::GetParametersTypeId | ( | ) | const |
Get ID of this parameters type.
|
overridevirtual |
Get list of used parameter IDs in the parameter set.
This method returns the IDs of all parameters contained in this set. Optionally, it can return only editable parameter IDs.
| editableOnly | If true, returns only IDs of editable parameters. If false (default), returns all parameter IDs. |
Implements iprm::IParamsSet.
Reimplemented in iprm::CComposedParamsSetComp.
|
overridevirtual |
Get parameter information provider.
Retrieves the parameter information provider that can be used to obtain metadata (names and descriptions) for parameters in this set.
Implements iprm::IParamsSet.
Reimplemented in iprm::CComposedParamsSetComp.
|
inline |
Get slave parameter set.
Slave parameter set will be used for non editable parameter query. If no slave parameter set is defined, it returns NULL.
Definition at line 117 of file CParamsSet.h.
References m_slaveSetPtr.
|
overridevirtual |
Reset data to its default state.
Default implementation in istd::IChangeable does nothing.
true if the operation was successful, and false otherwise. Reimplemented from istd::IChangeable.
|
overridevirtual |
Load or store state of this object as a archive stream.
Type of operation is depending on archive type.
Implements iser::ISerializable.
|
virtual |
Set editable parameter in this set.
Editable parameters are stored in set directly, the non editable in slave sets.
|
virtual |
Set editable parameter in this set.
Editable parameters are stored in set directly, the non editable in slave sets.
| void iprm::CParamsSet::SetParametersTypeId | ( | const QByteArray & | id | ) |
Set ID of this parameters type.
|
inline |
Set slave parameter set.
Slave parameter set will be used for non editable parameter query.
| slaveSetPtr | slave parameter set, or NULL, if no set is used. |
Definition at line 123 of file CParamsSet.h.
References m_slaveSetPtr.
|
protected |
Definition at line 105 of file CParamsSet.h.
|
protected |
Definition at line 107 of file CParamsSet.h.
|
protected |
Definition at line 109 of file CParamsSet.h.
Referenced by GetSlaveSet(), and SetSlaveSet().
|
protected |
Definition at line 111 of file CParamsSet.h.