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
11 #include <iipr/IFeaturesProvider.h>
12 
13 
14 namespace iipr
15 {
16 
17 
19  public iinsp::TSupplierCompWrap< QVector<i2d::CLine2d> >,
20  virtual public iipr::IFeaturesProvider
21 {
22 public:
24 
25  I_BEGIN_BASE_COMPONENT(CMultiLineSupplierCompBase);
26  I_REGISTER_INTERFACE(iipr::IFeaturesProvider);
27  I_END_COMPONENT;
28 
29  // reimplemented (iipr::IFeaturesProvider)
30  virtual int GetFeaturesCount() const;
31  virtual const imeas::INumericValue& GetFeature(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 
Standard implementation of interface iinsp::ISupplier with preparation for component implementation...
Describe additional meta information for set of numeric values.
Container allowing access to features.
iinsp::TSupplierCompWrap< QVector< i2d::CLine2d > > BaseClass
virtual const imeas::INumericValue & GetFeature(int index) const
Get access to single feature.
General parameter set containing list of numeric values.
Definition: INumericValue.h:20
virtual int GetFeaturesCount() const
Get number of stored features.

© 2007-2017 Witold Gantzke and Kirill Lepskiy