CSearchFeature.h
Go to the documentation of this file.
1 #ifndef iipr_CSearchFeature_included
2 #define iipr_CSearchFeature_included
3 
4 
5 // ACF includes
6 #include "i2d/CVector2d.h"
7 #include "i2d/CPosition2d.h"
9 
10 // ACF-Solutions includes
12 
13 
14 namespace iipr
15 {
16 
17 
21 class CSearchFeature: public TWeightedFeatureWrap<i2d::CPosition2d>
22 {
23 public:
25 
27 
29  double weight,
30  const i2d::CVector2d& position,
31  double angle,
32  const i2d::CVector2d& scale,
33  bool negativeModel = false,
34  int index = -1,
35  const QString& id = "");
36 
37  double GetAngle() const;
38  const i2d::CVector2d& GetScale() const;
39  int GetIndex() const;
40  const QString& GetId() const;
41  void SetId(QString id);
42  bool IsNegativeModelEnabled() const;
43  void SetNegativeModelEnabled(bool enable);
45 
46  // reimplemented (imeas::INumericValue)
47  virtual bool IsValueTypeSupported(ValueTypeId valueTypeId) const;
48  virtual imath::CVarVector GetComponentValue(ValueTypeId valueTypeId) const;
49 
50  // reimplemented (iser::ISerializable)
51  virtual bool Serialize(iser::IArchive& archive);
52 
53  // reimplemented (istd::IChangeable)
54  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
55  virtual istd::IChangeable* CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const;
56 
57 private:
58  i2d::CVector2d m_scale;
59  double m_angle;
60  int m_index;
61  QString m_id;
62  mutable i2d::CAffineTransformation2d m_transformation;
63  bool m_isNegativeModelEnabled;
64 };
65 
66 
67 } // namespace iipr
68 
69 
70 #endif // !iipr_CSearchFeature_included
71 
72 
const i2d::ITransformation2d & GetTransformation() const
virtual bool Serialize(iser::IArchive &archive)
int GetIndex() const
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
const i2d::CVector2d & GetScale() const
void SetNegativeModelEnabled(bool enable)
bool IsNegativeModelEnabled() const
const QString & GetId() const
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
virtual imath::CVarVector GetComponentValue(ValueTypeId valueTypeId) const
Get access to component value of the given type.
virtual bool IsValueTypeSupported(ValueTypeId valueTypeId) const
Check if the given value type (or value component) is supported.
double GetAngle() const
TWeightedFeatureWrap< i2d::CPosition2d > BaseClass
Wrapper allowing to create feature object from some another serializable one.
Implementation of the pattern search feature.
ValueTypeId
Define standard numeric value types.
Definition: INumericValue.h:25
void SetId(QString id)

© 2007-2011 Witold Gantzke and Kirill Lepskiy