20 #ifndef GeomDataAPI_Point2D_H_
21 #define GeomDataAPI_Point2D_H_
23 #include <GeomDataAPI.h>
24 #include <ModelAPI_Attribute.h>
25 #include <ModelAPI_Data.h>
40 GEOMDATAAPI_EXPORT
virtual void setValue(
const double theX,
const double theY) = 0;
42 GEOMDATAAPI_EXPORT
virtual void setValue(
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) = 0;
45 GEOMDATAAPI_EXPORT
virtual double x()
const = 0;
47 GEOMDATAAPI_EXPORT
virtual double y()
const = 0;
49 GEOMDATAAPI_EXPORT
virtual std::shared_ptr<GeomAPI_Pnt2d>
pnt() = 0;
55 GEOMDATAAPI_EXPORT
virtual void setText(
const std::wstring& theX,
56 const std::wstring& theY) = 0;
59 GEOMDATAAPI_EXPORT
virtual std::wstring
textX() = 0;
61 GEOMDATAAPI_EXPORT
virtual std::wstring
textY() = 0;
75 GEOMDATAAPI_EXPORT
virtual
83 const std::set<std::wstring>& theUsedParameters) = 0;
86 GEOMDATAAPI_EXPORT
virtual std::set<std::wstring>
usedParameters(
int theComponent)
const = 0;
89 GEOMDATAAPI_EXPORT
void move(
const double theDeltaX,
const double theDeltaY);
94 return std::string(
"Point2D");
103 static GEOMDATAAPI_EXPORT std::shared_ptr<GeomDataAPI_Point2D>
getPoint2D(
const DataPtr& theData,
104 const std::string& theAttribute);
113 typedef std::shared_ptr<GeomDataAPI_Point2D> AttributePoint2DPtr;
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
Attribute that contains 2D point coordinates.
Definition: GeomDataAPI_Point2D.h:37
virtual GEOMDATAAPI_EXPORT std::string expressionError(int theComponent)=0
Returns an expression error.
virtual GEOMDATAAPI_EXPORT bool expressionInvalid(int theComponent)=0
Returns true if text is invalid.
virtual GEOMDATAAPI_EXPORT void setCalculatedValue(const double theX, const double theY)=0
Defines the calculated double value.
static GEOMDATAAPI_EXPORT std::shared_ptr< GeomDataAPI_Point2D > getPoint2D(const DataPtr &theData, const std::string &theAttribute)
Returns this attribute from the data if it is possible.
Definition: GeomDataAPI_Point2D.cpp:33
static std::string typeId()
Returns the type of this class of attributes.
Definition: GeomDataAPI_Point2D.h:92
virtual GEOMDATAAPI_EXPORT void setExpressionError(int theComponent, const std::string &theError)=0
Allows to set expression (text) error (by the parameters listener)
virtual GEOMDATAAPI_EXPORT std::wstring textY()=0
Returns the text value for Y.
virtual GEOMDATAAPI_EXPORT double x() const =0
Returns the X double value.
virtual GEOMDATAAPI_EXPORT double y() const =0
Returns the Y double value.
virtual GEOMDATAAPI_EXPORT std::set< std::wstring > usedParameters(int theComponent) const =0
Returns the used parameters.
virtual GEOMDATAAPI_EXPORT void setExpressionInvalid(int theComponent, const bool theFlag)=0
Allows to set expression (text) as invalid (by the parameters listener)
virtual GEOMDATAAPI_EXPORT std::string attributeType()
Returns the type of this class of attributes, not static method.
Definition: GeomDataAPI_Point2D.cpp:28
GEOMDATAAPI_EXPORT GeomDataAPI_Point2D()
Objects are created for features automatically.
Definition: GeomDataAPI_Point2D.cpp:49
virtual GEOMDATAAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2d > pnt()=0
Returns the 2D point.
virtual GEOMDATAAPI_EXPORT void setUsedParameters(int theComponent, const std::set< std::wstring > &theUsedParameters)=0
Defines the used parameters.
virtual GEOMDATAAPI_EXPORT void setText(const std::wstring &theX, const std::wstring &theY)=0
Defines the text values.
GEOMDATAAPI_EXPORT void move(const double theDeltaX, const double theDeltaY)
Appends the delta values to point.
Definition: GeomDataAPI_Point2D.cpp:23
virtual GEOMDATAAPI_EXPORT void setValue(const double theX, const double theY)=0
Defines the double value.
virtual GEOMDATAAPI_EXPORT void setValue(const std::shared_ptr< GeomAPI_Pnt2d > &thePoint)=0
Defines the point.
virtual GEOMDATAAPI_EXPORT std::wstring textX()=0
Returns the text value for X.
PointComponent
Point component (x,y)
Definition: GeomDataAPI_Point2D.h:64
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34