Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
iprm::CParamsSet Class Reference

Basic implementation of interface IParamsSet. More...

#include <CParamsSet.h>

Inheritance diagram for iprm::CParamsSet:
iprm::IParamsSet iser::IObject iser::ISerializable istd::IChangeable istd::IPolymorphic iprm::CComposedParamsSetComp

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...
 

Public Member Functions

 CParamsSet (const IParamsSet *slaveSetPtr=NULL)
 
const IParamsSetGetSlaveSet () const
 Get slave parameter set. More...
 
void SetSlaveSet (const IParamsSet *slaveSetPtr)
 Set slave parameter set. More...
 
virtual bool SetEditableParameter (const QByteArray &id, iser::ISerializable *parameterPtr, bool releaseFlag=false)
 Set editable parameter in this set. More...
 
const ParameterInfosGetParameterInfos () const
 Get access to all parameters. More...
 
const QByteArray & GetParametersTypeId () const
 Get ID of this parameters type. More...
 
void SetParametersTypeId (const QByteArray &id)
 Set ID of this parameters type. More...
 
virtual QByteArray GetFactoryId () const
 
virtual Ids GetParamIds (bool editableOnly=false) const
 Get list of used parameter IDs in the parameter set. More...
 
virtual const iser::ISerializableGetParameter (const QByteArray &id) const
 Get any parameter. More...
 
virtual iser::ISerializableGetEditableParameter (const QByteArray &id)
 Get access to editable parameter. More...
 
virtual bool Serialize (iser::IArchive &archive)
 Load or store state of this object as a archive stream. More...
 
virtual quint32 GetMinimalVersion (int versionId) const
 Get minimal needed version to correct storing of this data. More...
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state. More...
 
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations. More...
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one. More...
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object. More...
 
virtual IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object. More...
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction. More...
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction. More...
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes. More...
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Member Functions

const ParameterInfoFindParameterInfo (const QByteArray &parameterId) const
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event. More...
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes. More...
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set. More...
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set. More...
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set. More...
 

Detailed Description

Basic implementation of interface IParamsSet.

Definition at line 22 of file CParamsSet.h.

Member Typedef Documentation

Definition at line 36 of file CParamsSet.h.

Constructor & Destructor Documentation

iprm::CParamsSet::CParamsSet ( const IParamsSet slaveSetPtr = NULL)
explicit

Member Function Documentation

virtual bool iprm::CParamsSet::CopyFrom ( const IChangeable &  object,
CompatibilityMode  mode = CM_WITHOUT_REFS 
)
virtual

Reimplemented in iprm::CComposedParamsSetComp.

const ParameterInfo* iprm::CParamsSet::FindParameterInfo ( const QByteArray &  parameterId) const
protected
virtual iser::ISerializable* iprm::CParamsSet::GetEditableParameter ( const QByteArray &  id)
virtual

Get access to editable parameter.

Parameters
idID of parameter. It is application specified.
Returns
pointer to parameter instance or NULL if there is no editable parameter with this ID.

Implements iprm::IParamsSet.

virtual QByteArray iprm::CParamsSet::GetFactoryId ( ) const
virtual

Reimplemented from iser::IObject.

virtual quint32 iprm::CParamsSet::GetMinimalVersion ( int  versionId) const
virtual

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.

virtual const iser::ISerializable* iprm::CParamsSet::GetParameter ( const QByteArray &  id) const
virtual

Get any parameter.

Parameters
idID of parameter. It is application specified.
Returns
pointer to parameter instance or NULL if there is no parameter with this ID.

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.

virtual Ids iprm::CParamsSet::GetParamIds ( bool  editableOnly = false) const
virtual

Get list of used parameter IDs in the parameter set.

Returns
Set of the parameter IDs.

Implements iprm::IParamsSet.

Reimplemented in iprm::CComposedParamsSetComp.

const IParamsSet * iprm::CParamsSet::GetSlaveSet ( ) const
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 105 of file CParamsSet.h.

virtual bool iprm::CParamsSet::ResetData ( CompatibilityMode  mode = CM_WITHOUT_REFS)
virtual

Reset data to its default state.

Default implementation in istd::IChangeable does nothing.

Returns
true if the operation was successful, and false otherwise.

Reimplemented from istd::IChangeable.

virtual bool iprm::CParamsSet::Serialize ( iser::IArchive archive)
virtual

Load or store state of this object as a archive stream.

Type of operation is depending on archive type.

See Also
iser::IArchive

Implements iser::ISerializable.

virtual bool iprm::CParamsSet::SetEditableParameter ( const QByteArray &  id,
iser::ISerializable parameterPtr,
bool  releaseFlag = false 
)
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.

void iprm::CParamsSet::SetSlaveSet ( const IParamsSet slaveSetPtr)
inline

Set slave parameter set.

Slave parameter set will be used for non editable parameter query.

Parameters
slaveSetPtrslave parameter set, or NULL, if no set is used.

Definition at line 111 of file CParamsSet.h.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy