20 #ifndef GeomData_Point2D_H_
21 #define GeomData_Point2D_H_
24 #include "GeomDataAPI_Point2D.h"
26 #include <TDF_Label.hxx>
37 enum { NUM_COMPONENTS = 2 };
38 std::shared_ptr<ModelAPI_ExpressionDouble> myExpression[NUM_COMPONENTS];
41 GEOMDATA_EXPORT
virtual void setValue(
const double theX,
const double theY);
43 GEOMDATA_EXPORT
virtual void setValue(
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
46 GEOMDATA_EXPORT
virtual double x()
const;
48 GEOMDATA_EXPORT
virtual double y()
const;
50 GEOMDATA_EXPORT
virtual std::shared_ptr<GeomAPI_Pnt2d>
pnt();
56 GEOMDATA_EXPORT
virtual void setText(
const std::wstring& theX,
57 const std::wstring& theY);
60 GEOMDATA_EXPORT
virtual std::wstring
textX();
61 GEOMDATA_EXPORT
virtual std::wstring
textY();
70 GEOMDATA_EXPORT
virtual void setExpressionError(
int theComponent,
const std::string& theError);
77 const std::set<std::wstring>& theUsedParameters);
80 GEOMDATA_EXPORT
virtual std::set<std::wstring>
usedParameters(
int theComponent)
const;
Attribute that contains 2D point coordinates.
Definition: GeomDataAPI_Point2D.h:37
Attribute that contains 2D point.
Definition: GeomData_Point2D.h:36
virtual double y() const
Returns the Y double value.
Definition: GeomData_Point2D.cpp:78
virtual std::shared_ptr< GeomAPI_Pnt2d > pnt()
Returns the 2D point.
Definition: GeomData_Point2D.cpp:83
virtual std::wstring textX()
Returns the text values.
Definition: GeomData_Point2D.cpp:103
virtual void setExpressionError(int theComponent, const std::string &theError)
Allows to set expression (text) error (by the parameters listener)
Definition: GeomData_Point2D.cpp:125
virtual void setUsedParameters(int theComponent, const std::set< std::wstring > &theUsedParameters)
Defines the used parameters.
Definition: GeomData_Point2D.cpp:138
virtual void setText(const std::wstring &theX, const std::wstring &theY)
Defines the text values.
Definition: GeomData_Point2D.cpp:89
virtual void reinit()
Reinitializes the internal state of the attribute (may be needed on undo/redo, abort,...
Definition: GeomData_Point2D.cpp:36
virtual void setCalculatedValue(const double theX, const double theY)
Defines the calculated double value.
Definition: GeomData_Point2D.cpp:53
virtual std::string expressionError(int theComponent)
Returns an expression error.
Definition: GeomData_Point2D.cpp:132
virtual std::wstring textY()
Returns the text value for Y.
Definition: GeomData_Point2D.cpp:107
virtual std::set< std::wstring > usedParameters(int theComponent) const
Returns the used parameters.
Definition: GeomData_Point2D.cpp:145
virtual void setExpressionInvalid(int, const bool theFlag)
Allows to set expression (text) as invalid (by the parameters listener)
Definition: GeomData_Point2D.cpp:112
virtual void setValue(const double theX, const double theY)
Defines the double value.
Definition: GeomData_Point2D.cpp:62
virtual void reset()
Resets attribute to default state.
Definition: GeomData_Point2D.cpp:45
virtual bool expressionInvalid(int)
Returns true if text is invalid.
Definition: GeomData_Point2D.cpp:119
virtual double x() const
Returns the X double value.
Definition: GeomData_Point2D.cpp:73
GeomData_Point2D()
Initializes attributes.
Definition: GeomData_Point2D.cpp:31
Expression for calculated double values.
Definition: ModelAPI_Expression.h:101
General object of the application that allows to get/set attributes from the document and compute res...
Definition: Model_Data.h:62