CGeneralNumericConstraints.h
Go to the documentation of this file.
1 #ifndef imeas_CGeneralNumericConstraints_included
2 #define imeas_CGeneralNumericConstraints_included
3 
4 
5 // ACF includes
7 
8 // ACF-Solutions includes
9 #include <imeas/INumericValue.h>
11 
12 
13 namespace imeas
14 {
15 
16 
21  virtual public INumericConstraints,
22  virtual protected iprm::IOptionsList
23 {
24 public:
28  void Reset();
32  virtual bool InsertValueInfo(
33  const QString& name,
34  const QString& description,
35  const QByteArray& valueId,
36  const imath::CGeneralUnitInfo& unitInfo,
37  int index = -1);
38 
42  void RemoveValueInfo(int index);
43 
47  const imath::CGeneralUnitInfo& GetGeneralUnitInfo(int index) const;
48 
49  // reimplemented (imeas::INumericConstraints)
50  virtual const iprm::IOptionsList& GetValueListInfo() const;
51  virtual const imath::IUnitInfo* GetNumericValueUnitInfo(int index) const;
52 
53  // reimplemented (iprm::IOptionsList)
54  virtual int GetOptionsFlags() const;
55  virtual int GetOptionsCount() const;
56  virtual QString GetOptionName(int index) const;
57  virtual QString GetOptionDescription(int index) const;
58  virtual QByteArray GetOptionId(int index) const;
59  virtual bool IsOptionEnabled(int index) const;
60 
61 private:
62  struct Info
63  {
64  QString name;
65  QString description;
66  QByteArray id;
67  imath::CGeneralUnitInfo unitInfo;
68  };
69 
70  QVector<Info> m_valueInfos;
71 };
72 
73 
74 } // namespace imeas
75 
76 
77 #endif // !imeas_CGeneralNumericConstraints_included
78 
79 
virtual bool IsOptionEnabled(int index) const
virtual QString GetOptionDescription(int index) const
virtual const imath::IUnitInfo * GetNumericValueUnitInfo(int index) const
Get range of possible numeric values for specified list index.
void RemoveValueInfo(int index)
Remove single value information.
virtual int GetOptionsCount() const
virtual bool InsertValueInfo(const QString &name, const QString &description, const QByteArray &valueId, const imath::CGeneralUnitInfo &unitInfo, int index=-1)
Add new value information.
const imath::CGeneralUnitInfo & GetGeneralUnitInfo(int index) const
Get unit info stored alway in this structure.
virtual const iprm::IOptionsList & GetValueListInfo() const
Get general information about the "content" of the numeric value.
Describe additional meta information for set of numeric values.
virtual int GetOptionsFlags() const
virtual QByteArray GetOptionId(int index) const
virtual QString GetOptionName(int index) const
void Reset()
Removes all value informations.
Simple implementation of imeas::INumericConstraints interface.

© 2007-2017 Witold Gantzke and Kirill Lepskiy