CNumericParamsComp.h
Go to the documentation of this file.
1 #ifndef imeas_CNumericParamsComp_included
2 #define imeas_CNumericParamsComp_included
3 
4 
5 // ACF includes
6 #include "iser/ISerializable.h"
8 #include "icomp/CComponentBase.h"
9 
10 // ACF-Solutions incldues
11 #include "imath/IUnitInfo.h"
14 
15 
16 namespace imeas
17 {
18 
19 
25  public icomp::CComponentBase,
26  public CSimpleNumericValue,
28  virtual protected INumericConstraints,
29  virtual protected imath::IUnitInfo
30 {
31 public:
34 
35  I_BEGIN_COMPONENT(CNumericParamsComp);
36  I_REGISTER_INTERFACE(istd::IChangeable);
37  I_REGISTER_INTERFACE(iser::ISerializable);
38  I_REGISTER_INTERFACE(INumericValue);
39  I_ASSIGN(m_dimensionsCountAttrPtr, "ValuesCount", "Default number of numeric values (will be used if no constraints set)", true, 1);
40  I_ASSIGN(m_minValueAttrPtr, "MinValues", "Minimal value (will be used if no constraints set)", true, 1);
41  I_ASSIGN(m_maxValueAttrPtr, "MaxValues", "Maximal value (will be used if no constraints set)", true, 10);
42  I_ASSIGN_MULTI_0(m_defaultValuesAttrPtr, "Values", "Default values", false);
43  I_ASSIGN(m_constraintsCompPtr, "Constraints", "Constraints object describing possible parameter values", false, "Constraints");
44  I_ASSIGN_TO(m_constraintsModelCompPtr, m_constraintsCompPtr, false);
45  I_END_COMPONENT;
46 
47  // reimplemented (imeas::INumericValue)
48  virtual const INumericConstraints* GetNumericConstraints() const;
49 
50 protected:
51  // reimplemented (icomp::CComponentBase)
52  virtual void OnComponentCreated();
53  virtual void OnComponentDestroyed();
54 
55  // reimplemented (imeas::INumericConstraints)
56  virtual int GetNumericValuesCount() const;
57  virtual QString GetNumericValueName(int index) const;
58  virtual QString GetNumericValueDescription(int index) const;
59  virtual const imath::IUnitInfo& GetNumericValueUnitInfo(int index) const;
60 
61  // reimplemented (imath::IUnitInfo)
62  virtual int GetUnitType() const;
63  virtual QString GetUnitName() const;
64  virtual double GetDisplayMultiplicationFactor() const;
65  virtual istd::CRange GetValueRange() const;
66  virtual const imath::IDoubleManip& GetValueManip() const;
67 
68 private:
69  I_ATTR(int, m_dimensionsCountAttrPtr);
70  I_ATTR(double, m_minValueAttrPtr);
71  I_ATTR(double, m_maxValueAttrPtr);
72  I_MULTIATTR(double, m_defaultValuesAttrPtr);
73  I_REF(INumericConstraints, m_constraintsCompPtr);
74  I_REF(imod::IModel, m_constraintsModelCompPtr);
75 };
76 
77 
78 } // namespace imeas
79 
80 
81 #endif // !imeas_CNumericParamsComp_included
82 
83 
virtual QString GetNumericValueDescription(int index) const
Get human readable description of numeric value for specified list index.
virtual const INumericConstraints * GetNumericConstraints() const
Get parameter constraints describing possible parameter values.
virtual void OnComponentDestroyed()
CSimpleNumericValue BaseClass2
Describe additional meta information for set of numeric values.
I_ASSIGN_TO(m_constraintsModelCompPtr, m_constraintsCompPtr, false)
Basic implementation of imeas::INumericValue interface.
virtual int GetNumericValuesCount() const
Get number of expected numeric values.
virtual istd::CRange GetValueRange() const
virtual void OnComponentCreated()
virtual const imath::IUnitInfo & GetNumericValueUnitInfo(int index) const
Get range of possible numeric values for specified list index.
General parameter set containing list of numeric values.
Definition: INumericValue.h:19
virtual int GetUnitType() const
virtual QString GetUnitName() const
Component implementating imeas::INumericValue interface.
icomp::CComponentBase BaseClass
virtual const imath::IDoubleManip & GetValueManip() const
virtual QString GetNumericValueName(int index) const
Get human readable name of numeric value for specified list index.
virtual double GetDisplayMultiplicationFactor() const

© 2007-2011 Witold Gantzke and Kirill Lepskiy