ACF $AcfVersion:0$
CObject2dProxyComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
8
9
10namespace i2d
11{
12
13
20 public IObject2d
21{
22public:
24
25 I_BEGIN_COMPONENT(CObject2dProxyComp);
26 I_REGISTER_INTERFACE(IObject2d);
27 I_REGISTER_INTERFACE(istd::IChangeable);
28 I_ASSIGN(m_object2dProviderCompPtr, "Object2dProvider", "Provider of a 2D object", true, "Object2dProvider");
29 I_END_COMPONENT;
30
31 // reimplemented (i2d::IObject2d)
32 virtual CVector2d GetCenter() const override;
33 virtual void MoveCenterTo(const CVector2d& position) override;
34 virtual CRectangle GetBoundingBox() const override;
35 virtual void SetCalibration(const ICalibration2d* calibrationPtr, bool releaseFlag = false) override;
36 virtual bool Transform(
37 const ITransformation2d& transformation,
39 double* errorFactorPtr = NULL) override;
40 virtual bool InvTransform(
41 const ITransformation2d& transformation,
43 double* errorFactorPtr = NULL) override;
44 virtual bool GetTransformed(
45 const ITransformation2d& transformation,
46 IObject2d& result,
48 double* errorFactorPtr = NULL) const override;
49 virtual bool GetInvTransformed(
50 const ITransformation2d& transformation,
51 IObject2d& result,
53 double* errorFactorPtr = NULL) const override;
54
55 // reimplemented (i2d::IClibrationProvider)
56 virtual const ICalibration2d* GetCalibration() const override;
57
58 // reimplemented (iser::ISerializable)
59 virtual bool Serialize(iser::IArchive& archive) override;
60
61 // reimplemented (istd::IChangeable)
63
64protected:
66
67private:
68 I_REF(i2d::IObject2dProvider, m_object2dProviderCompPtr);
69};
70
71
72} // namespace i2d
73
74
75
76
Implementation of a proxy of IObject2d interface realized over IObject2dProvider access.
virtual CRectangle GetBoundingBox() const override
Get bounding box of this shape.
virtual CVector2d GetCenter() const override
Returns center of this 2D-object.
virtual const ICalibration2d * GetCalibration() const override
Get access to transformation object, which transforms a local logical coordinate system to global one...
icomp::CComponentBase BaseClass
virtual void SetCalibration(const ICalibration2d *calibrationPtr, bool releaseFlag=false) override
Set calibration of this object.
virtual bool GetTransformed(const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const override
Calulate transformation of the object into second one.
virtual bool Transform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) override
Transform this object using some transformation.
virtual bool GetInvTransformed(const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const override
Calulate inverse transformation of the object into second one.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual istd::TUniqueInterfacePtr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
virtual bool InvTransform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) override
Do inverse transformation of this object.
virtual void MoveCenterTo(const CVector2d &position) override
Move object to position position.
const i2d::IObject2d * GetObject2d() const
Definition of rectangle area orthogonal to axis of coordination system.
Definition CRectangle.h:27
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Interface for 2D calibration and coordinate transformation with unit information.
Common interface for describing the 2D-objects.
Definition IObject2d.h:26
Common interface for a provider, which delivers a 2D-object.
Common interface for all calibration objects.
@ EM_NONE
There are no preferences, should be automatically selected.
Base class for component implementation.
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Unique ownership smart pointer for interface types.
#define NULL
Definition istd.h:74
Contains the 2D objects.
Definition CAffine2d.h:11