CCalibration2dProxyComp.h
Go to the documentation of this file.
1 #ifndef icalib_CCalibration2dProxyComp_included
2 #define icalib_CCalibration2dProxyComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
8 #include <i2d/ICalibration2d.h>
10 
11 
12 namespace icalib
13 {
14 
15 
21  public icomp::CComponentBase,
22  public i2d::ICalibration2d
23 {
24 public:
26 
27  I_BEGIN_COMPONENT(CCalibration2dProxyComp);
28  I_REGISTER_INTERFACE(ICalibration2d);
29  I_REGISTER_INTERFACE(ITransformation2d);
30  I_REGISTER_INTERFACE(istd::IChangeable);
31  I_ASSIGN(m_calibrationProviderCompPtr, "CalibrationProvider", "Provider of a 2D calibration", true, "CalibrationProvider");
32  I_ASSIGN_TO(m_calibrationProviderModelCompPtr, m_calibrationProviderCompPtr, true);
33  I_ASSIGN(m_defaultCalibrationProviderCompPtr, "DefaultCalibrationProvider", "Provides default (fallback) calibration if the input calibration provider was failed", false, "DefaultCalibrationProvider");
34  I_END_COMPONENT;
35 
37 
38  // reimplemented (i2d::ICalibration2d)
39  virtual const i2d::CRectangle* GetArgumentArea() const;
40  virtual const i2d::CRectangle* GetResultArea() const;
41  virtual const imath::IUnitInfo* GetArgumentUnitInfo() const;
42  virtual const imath::IUnitInfo* GetResultUnitInfo() const;
43  virtual const ICalibration2d* CreateCombinedCalibration(const ITransformation2d& transformation) const;
44 
45  // reimplemented (i2d::ITransformation2d)
46  virtual int GetTransformationFlags() const;
47  virtual bool GetDistance(
48  const i2d::CVector2d& origPos1,
49  const i2d::CVector2d& origPos2,
50  double& result,
51  ExactnessMode mode = EM_NONE) const;
52  virtual bool GetPositionAt(
53  const i2d::CVector2d& origPosition,
54  i2d::CVector2d& result,
55  ExactnessMode mode = EM_NONE) const;
56  virtual bool GetInvPositionAt(
57  const i2d::CVector2d& transfPosition,
58  i2d::CVector2d& result,
59  ExactnessMode mode = EM_NONE) const;
60  virtual bool GetLocalTransform(
61  const i2d::CVector2d& origPosition,
62  i2d::CAffine2d& result,
63  ExactnessMode mode = EM_NONE) const;
64  virtual bool GetLocalInvTransform(
65  const i2d::CVector2d& transfPosition,
66  i2d::CAffine2d& result,
67  ExactnessMode mode = EM_NONE) const;
68 
69  // reimplemented (imath::TISurjectFunction<i2d::CVector2d, i2d::CVector2d>)
70  virtual bool GetInvValueAt(const i2d::CVector2d& argument, i2d::CVector2d& result) const;
71  virtual i2d::CVector2d GetInvValueAt(const i2d::CVector2d& argument) const;
72 
73  // reimplemented (imath::TIMathFunction<i2d::CVector2d, i2d::CVector2d>)
74  virtual bool GetValueAt(const i2d::CVector2d& argument, i2d::CVector2d& result) const;
75  virtual i2d::CVector2d GetValueAt(const i2d::CVector2d& argument) const;
76 
77  // reimplemented (iser::ISerializable)
78  virtual bool Serialize(iser::IArchive& archive);
79 
80  // reimplemented (istd::IChangeable)
81  virtual istd::IChangeable* CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const;
82 
83 protected:
84  // reimplemented (icomp::CComponentBase)
85  virtual void OnComponentCreated();
86  virtual void OnComponentDestroyed();
87 
88 private:
89  const i2d::ICalibration2d* GetCalibration() const;
90 
91 private:
92  I_REF(i2d::ICalibrationProvider, m_calibrationProviderCompPtr);
93  I_REF(imod::IModel, m_calibrationProviderModelCompPtr);
94  I_REF(i2d::ICalibrationProvider, m_defaultCalibrationProviderCompPtr);
95 
96  imod::CModelUpdateBridge m_updateBridge;
97 };
98 
99 
100 } // namespace icalib
101 
102 
103 #endif // !icalib_CCalibration2dProxyComp_included
104 
105 
virtual bool GetLocalInvTransform(const i2d::CVector2d &transfPosition, i2d::CAffine2d &result, ExactnessMode mode=EM_NONE) const
virtual bool GetValueAt(const i2d::CVector2d &argument, i2d::CVector2d &result) const
virtual const i2d::CRectangle * GetResultArea() const
virtual const imath::IUnitInfo * GetArgumentUnitInfo() const
virtual const ICalibration2d * CreateCombinedCalibration(const ITransformation2d &transformation) const
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
virtual bool Serialize(iser::IArchive &archive)
virtual bool GetDistance(const i2d::CVector2d &origPos1, const i2d::CVector2d &origPos2, double &result, ExactnessMode mode=EM_NONE) const
virtual bool GetInvValueAt(const i2d::CVector2d &argument, i2d::CVector2d &result) const
Implementation of a proxy of ICalibration2d interface realized over ICalibrationProvider access...
virtual bool GetLocalTransform(const i2d::CVector2d &origPosition, i2d::CAffine2d &result, ExactnessMode mode=EM_NONE) const
virtual int GetTransformationFlags() const
virtual const imath::IUnitInfo * GetResultUnitInfo() const
virtual const i2d::CRectangle * GetArgumentArea() const
virtual bool GetPositionAt(const i2d::CVector2d &origPosition, i2d::CVector2d &result, ExactnessMode mode=EM_NONE) const
virtual bool GetInvPositionAt(const i2d::CVector2d &transfPosition, i2d::CVector2d &result, ExactnessMode mode=EM_NONE) const

© 2007-2017 Witold Gantzke and Kirill Lepskiy