CParamsManagerComp.h
Go to the documentation of this file.
1 #ifndef iprm_CParamsManagerComp_included
2 #define iprm_CParamsManagerComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QVector>
7 
8 // ACF includes
9 #include <istd/TDelPtr.h>
10 #include <imod/TModelWrap.h>
12 
13 
14 namespace iprm
15 {
16 
17 
22 {
23 public:
25 
26  I_BEGIN_COMPONENT(CParamsManagerComp);
27  I_REGISTER_INTERFACE(ISelectionParam);
28  I_REGISTER_INTERFACE(IParamsManager);
29  I_REGISTER_INTERFACE(iser::ISerializable);
30  I_REGISTER_INTERFACE(IOptionsManager);
31  I_REGISTER_INTERFACE(IOptionsList);
32  I_ASSIGN(m_paramSetsFactPtr, "ParamsSetFactory", "Factory of variable parameter set", false, "ParamsSet");
33  I_END_COMPONENT;
34 
35  bool SetSetsCount(int count);
36 
37  // reimplemented (iprm::IParamsManager)
38  virtual const IOptionsList* GetParamsTypeConstraints() const;
39 
40  // reimplemented (iser::ISerializable)
41  virtual bool Serialize(iser::IArchive& archive);
42 
43  // reimplemented (iprm::IOptionsManager)
44  virtual int GetOptionOperationFlags(int index = -1) const;
45  virtual bool SetOptionEnabled(int index, bool isEnabled = true);
46  virtual bool RemoveOption(int index);
47  virtual bool InsertOption(
48  const QString& optionName,
49  const QByteArray& optionId,
50  const QString& optionDescription = QString(),
51  int index = -1);
52  virtual bool SwapOptions(int index1, int index2);
53  virtual bool SetOptionName(int optionIndex, const QString& optionName);
54  virtual bool SetOptionDescription(int optionIndex, const QString& optionDescription);
55 
56 protected:
57  // reimplemented (CParamsManagerCompBase)
58  virtual bool IsParameterCreationSupported() const;
59  virtual int GetCreatedParamsSetsCount() const;
60  virtual iprm::IParamsSet* CreateParamsSetInstance(int typeIndex = -1) const;
61 
62  // reimplemented (icomp::CComponentBase)
63  virtual void OnComponentCreated();
64  virtual void OnComponentDestroyed();
65 
66 private:
67  I_FACT(IParamsSet, m_paramSetsFactPtr);
68 };
69 
70 
71 } // namespace iprm
72 
73 
74 #endif // !iprm_CParamsManagerComp_included
75 
76 
Manager of parameters set.
virtual bool SetOptionDescription(int optionIndex, const QString &optionDescription)
Set a new description for the option at the given index optionIndex.
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
virtual void OnComponentCreated()
virtual const IOptionsList * GetParamsTypeConstraints() const
Get selection contraints describing each supported type.
bool SetSetsCount(int count)
virtual int GetCreatedParamsSetsCount() const
Get the number of parameter sets created at the run time.
virtual void OnComponentDestroyed()
Constraints of selection from set of possibilities.
Definition: IOptionsList.h:22
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
virtual bool SwapOptions(int index1, int index2)
Swap two options.
Common interface for the management of the dynamic selection constraints.
CParamsManagerCompBase BaseClass
virtual bool SetOptionEnabled(int index, bool isEnabled=true)
Enables a given option.
Represent input/output persistence archive.
Definition: IArchive.h:30
Implementation of parameter manager.
virtual iprm::IParamsSet * CreateParamsSetInstance(int typeIndex=-1) const
Create a new instance of the parameter set.
virtual bool SetOptionName(int optionIndex, const QString &optionName)
Set a new name for the option at the given index optionIndex.
virtual bool InsertOption(const QString &optionName, const QByteArray &optionId, const QString &optionDescription=QString(), int index=-1)
Insert an option at some position.
virtual int GetOptionOperationFlags(int index=-1) const
Get operation control flags of some option or whole manager.
Interface allowing to select single option from list of options.
Implementation of parameter manager.
virtual bool RemoveOption(int index)
Remove an option at the given index.
Set of general parameters.
Definition: IParamsSet.h:23
virtual bool IsParameterCreationSupported() const
Return true if creation of parameter sets is supported by the implementation.

© 2007-2017 Witold Gantzke and Kirill Lepskiy