CMultiLineSupplierCompBase.h
Go to the documentation of this file.
1 #ifndef iipr_CMultiLineSupplier_included
2 #define iipr_CMultiLineSupplier_included
3 
4 
5 // ACF includes
6 #include "i2d/CPolyline.h"
7 #include "iprm/IParamsSet.h"
9 
10 // ACF-Solutions includes
12 
13 
14 namespace iipr
15 {
16 
17 
19  public iproc::TSupplierCompWrap< QVector<i2d::CLine2d> >,
20  virtual public imeas::INumericValueProvider
21 {
22 public:
24 
25  I_BEGIN_BASE_COMPONENT(CMultiLineSupplierCompBase);
26  I_REGISTER_INTERFACE(imeas::INumericValueProvider);
27  I_END_COMPONENT;
28 
29  // reimplemented (imeas::INumericValueProvider)
30  virtual int GetValuesCount() const;
31  virtual const imeas::INumericValue& GetNumericValue(int index) const;
32 
33 private:
34  class Line: virtual public imeas::INumericValue
35  {
36  public:
37  Line();
38  Line(const i2d::CLine2d& line);
39 
40  // reimplemented (imeas::INumericValue)
41  virtual bool IsValueTypeSupported(ValueTypeId valueTypeId) const;
42  virtual const imeas::INumericConstraints* GetNumericConstraints() const;
43  virtual imath::CVarVector GetComponentValue(ValueTypeId valueTypeId) const;
44  virtual imath::CVarVector GetValues() const;
45  virtual bool SetValues(const imath::CVarVector& values);
46 
47  // reimplemented (iser::ISerializable)
48  virtual bool Serialize(iser::IArchive& archive);
49 
50  // reimplemented (istd::IChangeable)
51  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
52 
53  protected:
54  imath::CVarVector m_values;
55  };
56 
57  typedef QMap<int, Line> LinesCache;
58 
59  mutable LinesCache m_linesCache;
60 };
61 
62 
63 } // namespace iipr
64 
65 
66 #endif // !iipr_CMultiLineSupplier_included
67 
68 
virtual int GetValuesCount() const
Get number of numeric values in the list.
virtual const imeas::INumericValue & GetNumericValue(int index) const
Returns a single numeric value from the list.
Describe additional meta information for set of numeric values.
Provide access to the list of the numeric values.
General parameter set containing list of numeric values.
Definition: INumericValue.h:19
iproc::TSupplierCompWrap< QVector< i2d::CLine2d > > BaseClass
Standard implementation of interface iproc::ISupplier with preparation for component implementation...

© 2007-2011 Witold Gantzke and Kirill Lepskiy