Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
iprm::CParamsManagerCompBase Class Referenceabstract

Implementation of parameter manager. More...

#include <CParamsManagerCompBase.h>

Inheritance diagram for iprm::CParamsManagerCompBase:
iprm::CParamsManagerCompBaseAttr iprm::IParamsManager iprm::IOptionsManager icomp::CComponentBase iprm::ISelectionParam iprm::IOptionsList iprm::ISelectionParam icomp::IComponent iser::ISerializable istd::IChangeable iser::ISerializable istd::IPolymorphic istd::IChangeable istd::IPolymorphic istd::IChangeable istd::IPolymorphic istd::IPolymorphic iprm::CMultiParamsManagerComp iprm::CParamsManagerComp

Classes

class  ParamSet
 
class  SelectedParams
 

Public Types

typedef CParamsManagerCompBaseAttr BaseClass
 
- Public Types inherited from iprm::CParamsManagerCompBaseAttr
typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from iprm::IParamsManager
enum  ParamsOperationFlags {
  MF_COUNT_FIXED = 1, MF_SUPPORT_RENAME = 2, MF_SUPPORT_INSERT = 4, MF_SUPPORT_DELETE = 8,
  MF_SUPPORT_SWAP = 16, MF_DISABLE_ALLOWED = 32, MF_SUPPORT_EDIT = 64, MF_INACTIVE = 128
}
 Bitwise coded flags used to find out supported features. More...
 
enum  ChangeFlags { CF_SET_INSERTED = 0x5af60, CF_SET_REMOVED, CF_SET_NAME_CHANGED, CF_SET_ENABLE_CHANGED }
 Possible changes of the manager's data model. More...
 
typedef QSet< QByteArray > TypeIds
 
- Public Types inherited from iprm::ISelectionParam
enum  ChangeFlags { CF_SELECTION_CHANGED = 0x67364be }
 Data model change notification flags. More...
 
enum  { NO_SELECTION = -1 }
 
- 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 Types inherited from iprm::IOptionsManager
enum  ChangeFlags { CF_OPTION_ADDED = 0x26be73a, CF_OPTION_REMOVED }
 Data model change notification flags. More...
 
enum  OptionOperationFlags {
  OOF_COUNT_FIXED = 1, OOF_SUPPORT_RENAME = 2, OOF_SUPPORT_INSERT = 4, OOF_SUPPORT_DELETE = 8,
  OOF_SUPPORT_SWAP = 16, OOF_DISABLE_ALLOWED = 32, OOF_SUPPORT_ENABLING = 64
}
 Bitwise coded flags used to find out supported features. More...
 
- Public Types inherited from iprm::IOptionsList
enum  ChangeFlags { CF_OPTIONS_CHANGED = 0x8263d86, CF_OPTION_RENAMED }
 Flags for changes related to this interface. More...
 
enum  OptionsFlags { SCF_NONE = 0, SCF_SUPPORT_UNIQUE_ID = 256, SFC_DISABLE_ALLOWED = 32 }
 Flags for control constraints behavior. More...
 

Public Member Functions

 CParamsManagerCompBase ()
 
virtual int InsertParamsSet (int typeIndex=-1, int index=-1)
 Insert new parameters set at selected position. More...
 
virtual bool RemoveParamsSet (int index)
 Remove parameters set at selected position. More...
 
virtual bool SwapParamsSet (int index1, int index2)
 Swap two parameter sets. More...
 
virtual IParamsSetGetParamsSet (int index) const
 Get selected parameter set. More...
 
virtual IParamsSetCreateParameterSet (int typeIndex=-1, int index=-1) const
 
virtual int GetIndexOperationFlags (int index=-1) const
 Get operation control flags of some paramter set or whole manager. More...
 
virtual int GetParamsSetsCount () const
 Get number of managed set. More...
 
virtual QString GetParamsSetName (int index) const
 Get name of specified parameter set. More...
 
virtual bool SetParamsSetName (int index, const QString &name)
 Set name of specified parameter set. More...
 
virtual QString GetParamsSetDescription (int index) const
 Get the description of the specified parameter set. More...
 
virtual void SetParamsSetDescription (int index, const QString &description)
 Set the description of the specified parameter set. More...
 
virtual const IOptionsListGetSelectionConstraints () const
 Get constraints of this parameter. More...
 
virtual int GetSelectedOptionIndex () const
 Get selected index. More...
 
virtual bool SetSelectedOptionIndex (int index)
 Set index of selected option. More...
 
virtual ISelectionParamGetSubselection (int index) const
 Get subselection for specified option. More...
 
virtual int GetOptionsFlags () const
 Get constraints flags. More...
 
virtual int GetOptionsCount () const
 Get number of managed options. More...
 
virtual QString GetOptionName (int index) const
 Get name of specified option. More...
 
virtual QString GetOptionDescription (int index) const
 Get human readable description for a option with the index index. More...
 
virtual QByteArray GetOptionId (int index) const
 Get option ID. More...
 
virtual bool IsOptionEnabled (int index) const
 Return true if the option is enabled and can be selected. More...
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context. More...
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component. More...
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")
 Get access to specified component interface. More...
 
virtual const IComponentContextGetComponentContext () const
 Get access to component context describing all application-specified component information loaded from components registry. More...
 
virtual void SetComponentContext (const icomp::IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 Set component context of this component. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from iprm::IParamsManager
virtual const IOptionsListGetParamsTypeConstraints () const =0
 Get selection contraints describing each supported type. More...
 
- Public Member Functions inherited from iser::ISerializable
virtual bool Serialize (IArchive &archive)=0
 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...
 
- 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 bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state. 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 iprm::IOptionsManager
virtual int GetOptionOperationFlags (int index=-1) const =0
 Get operation control flags of some option or whole manager. More...
 
virtual bool SetOptionEnabled (int index, bool isEnabled=true)=0
 Enables a given option. More...
 
virtual bool RemoveOption (int index)=0
 Remove an option at the given index. More...
 
virtual bool InsertOption (const QString &optionName, const QByteArray &optionId, const QString &optionDescription=QString(), int index=-1)=0
 Insert an option at some position. More...
 
virtual bool SwapOptions (int index1, int index2)=0
 Swap two options. More...
 
virtual bool SetOptionName (int optionIndex, const QString &optionName)=0
 Set a new name for the option at the given index optionIndex. More...
 
virtual bool SetOptionDescription (int optionIndex, const QString &optionDescription)=0
 Set a new description for the option at the given index optionIndex. More...
 

Protected Types

typedef istd::TDelPtr< ParamSetParamSetPtr
 
typedef QList< ParamSetPtrParamSets
 

Protected Member Functions

void EnsureParamsSetModelDetached (iprm::IParamsSet *paramsSetPtr) const
 
QString CalculateNewDefaultName () const
 
int FindParamSetIndex (const QString &name) const
 
int FindFixedParamSetIndex (const QString &name) const
 
virtual bool IsParameterCreationSupported () const =0
 Return true if creation of parameter sets is supported by the implementation. More...
 
virtual int GetCreatedParamsSetsCount () const =0
 Get the number of parameter sets created at the run time. More...
 
virtual iprm::IParamsSetCreateParamsSetInstance (int typeIndex=-1) const =0
 Create a new instance of the parameter set. More...
 
virtual void OnComponentCreated ()
 
- Protected Member Functions inherited from iprm::CParamsManagerCompBaseAttr
 I_MULTITEXTATTR (m_fixedSetNamesAttrPtr)
 
 I_MULTITEXTATTR (m_fixedSetDescriptionsAttrPtr)
 
 I_TEXTATTR (m_defaultSetNameAttrPtr)
 
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active. More...
 
virtual void OnComponentDestroyed ()
 
virtual const
icomp::IRealComponentStaticInfo
GetComponentStaticInfo () const =0
 Get access to static info of this component. More...
 
- 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...
 

Protected Attributes

int m_selectedIndex
 
ParamSets m_paramSets
 
imod::CModelUpdateBridge m_updateBridge
 

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...
 
- Static Protected Member Functions inherited from icomp::CComponentBase
static const
icomp::IRealComponentStaticInfo
InitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const icomp::IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 

Detailed Description

Implementation of parameter manager.

Definition at line 65 of file CParamsManagerCompBase.h.

Member Typedef Documentation

Definition at line 71 of file CParamsManagerCompBase.h.

Definition at line 204 of file CParamsManagerCompBase.h.

Definition at line 206 of file CParamsManagerCompBase.h.

Constructor & Destructor Documentation

iprm::CParamsManagerCompBase::CParamsManagerCompBase ( )

Member Function Documentation

QString iprm::CParamsManagerCompBase::CalculateNewDefaultName ( ) const
protected
virtual IParamsSet* iprm::CParamsManagerCompBase::CreateParameterSet ( int  typeIndex = -1,
int  index = -1 
) const
virtual
Parameters
typeIndexIndex of parameter type. This index is context specified and is used to indicate type of parameters should be created. If equals negative value, the type will be automatically selected.
indexIf index is not negative, the parameter set data at the given position will be copied to the created instance.
Note
The caller is responsible for the memory mangement of the created parameter set.

Implements iprm::IParamsManager.

virtual iprm::IParamsSet* iprm::CParamsManagerCompBase::CreateParamsSetInstance ( int  typeIndex = -1) const
protectedpure virtual

Create a new instance of the parameter set.

Implemented in iprm::CMultiParamsManagerComp, and iprm::CParamsManagerComp.

void iprm::CParamsManagerCompBase::EnsureParamsSetModelDetached ( iprm::IParamsSet paramsSetPtr) const
protected
int iprm::CParamsManagerCompBase::FindFixedParamSetIndex ( const QString &  name) const
protected
int iprm::CParamsManagerCompBase::FindParamSetIndex ( const QString &  name) const
protected
virtual int iprm::CParamsManagerCompBase::GetCreatedParamsSetsCount ( ) const
protectedpure virtual

Get the number of parameter sets created at the run time.

Implemented in iprm::CMultiParamsManagerComp, and iprm::CParamsManagerComp.

virtual int iprm::CParamsManagerCompBase::GetIndexOperationFlags ( int  index = -1) const
virtual

Get operation control flags of some paramter set or whole manager.

See Also
ManagerFlags.
Parameters
indexindex addressing position in parameter set list. For negative value general flags are returned. For example if you want to check if there is any renameable element you should call it with negative index value. To check if first element can be renamed call it with index value 0. To check if you can insert at the last position please use index value equal to current number of parameter set.

Implements iprm::IParamsManager.

virtual QString iprm::CParamsManagerCompBase::GetOptionDescription ( int  index) const
virtual

Get human readable description for a option with the index index.

Implements iprm::IOptionsList.

virtual QByteArray iprm::CParamsManagerCompBase::GetOptionId ( int  index) const
virtual

Get option ID.

The option ID must be unique, if flag SCF_SUPPORT_UNIQUE_ID is set.

See Also
OptionsFlags

Implements iprm::IOptionsList.

virtual QString iprm::CParamsManagerCompBase::GetOptionName ( int  index) const
virtual

Get name of specified option.

Implements iprm::IOptionsList.

virtual int iprm::CParamsManagerCompBase::GetOptionsCount ( ) const
virtual

Get number of managed options.

Implements iprm::IOptionsList.

virtual int iprm::CParamsManagerCompBase::GetOptionsFlags ( ) const
virtual

Get constraints flags.

The flags describes how the constraints object mantainance

Implements iprm::IOptionsList.

virtual IParamsSet* iprm::CParamsManagerCompBase::GetParamsSet ( int  index) const
virtual

Get selected parameter set.

Implements iprm::IParamsManager.

virtual QString iprm::CParamsManagerCompBase::GetParamsSetDescription ( int  index) const
virtual

Get the description of the specified parameter set.

Implements iprm::IParamsManager.

virtual QString iprm::CParamsManagerCompBase::GetParamsSetName ( int  index) const
virtual

Get name of specified parameter set.

Implements iprm::IParamsManager.

virtual int iprm::CParamsManagerCompBase::GetParamsSetsCount ( ) const
virtual

Get number of managed set.

Implements iprm::IParamsManager.

virtual int iprm::CParamsManagerCompBase::GetSelectedOptionIndex ( ) const
virtual

Get selected index.

Returns
index of selected option or negative value if no option is selected.

Implements iprm::ISelectionParam.

virtual const IOptionsList* iprm::CParamsManagerCompBase::GetSelectionConstraints ( ) const
virtual

Get constraints of this parameter.

Constraints describes some additional information about allowed parameter ranges and related informations.

Implements iprm::ISelectionParam.

virtual ISelectionParam* iprm::CParamsManagerCompBase::GetSubselection ( int  index) const
virtual

Get subselection for specified option.

Please note, that returned options tree belongs to selection data model.

Implements iprm::ISelectionParam.

virtual int iprm::CParamsManagerCompBase::InsertParamsSet ( int  typeIndex = -1,
int  index = -1 
)
virtual

Insert new parameters set at selected position.

Parameters
typeIndexIndex of parameter type. This index is context specified and is used to indicate type of parameters should be added. If equals negative value the type will be automatically selected.
indexPosition in list of parameters or negative value to use default position.
Returns
Position of inserted new entry or negative value if no insert was possible. For specified index positions (positive index value) it will return the same index or negative value.

Implements iprm::IParamsManager.

virtual bool iprm::CParamsManagerCompBase::IsOptionEnabled ( int  index) const
virtual

Return true if the option is enabled and can be selected.

Implements iprm::IOptionsList.

virtual bool iprm::CParamsManagerCompBase::IsParameterCreationSupported ( ) const
protectedpure virtual

Return true if creation of parameter sets is supported by the implementation.

Implemented in iprm::CMultiParamsManagerComp, and iprm::CParamsManagerComp.

virtual void iprm::CParamsManagerCompBase::OnComponentCreated ( )
protectedvirtual
virtual bool iprm::CParamsManagerCompBase::RemoveParamsSet ( int  index)
virtual

Remove parameters set at selected position.

Implements iprm::IParamsManager.

virtual void iprm::CParamsManagerCompBase::SetParamsSetDescription ( int  index,
const QString &  description 
)
virtual

Set the description of the specified parameter set.

Implements iprm::IParamsManager.

virtual bool iprm::CParamsManagerCompBase::SetParamsSetName ( int  index,
const QString &  name 
)
virtual

Set name of specified parameter set.

Implements iprm::IParamsManager.

virtual bool iprm::CParamsManagerCompBase::SetSelectedOptionIndex ( int  index)
virtual

Set index of selected option.

Returns
true if selection change was possible.

Implements iprm::ISelectionParam.

virtual bool iprm::CParamsManagerCompBase::SwapParamsSet ( int  index1,
int  index2 
)
virtual

Swap two parameter sets.

Implements iprm::IParamsManager.

Member Data Documentation

ParamSets iprm::CParamsManagerCompBase::m_paramSets
protected

Definition at line 208 of file CParamsManagerCompBase.h.

int iprm::CParamsManagerCompBase::m_selectedIndex
protected

Definition at line 143 of file CParamsManagerCompBase.h.

imod::CModelUpdateBridge iprm::CParamsManagerCompBase::m_updateBridge
protected

Definition at line 210 of file CParamsManagerCompBase.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy