1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomData_Point.h
4 // Created: 24 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomData_Point_H_
8 #define GeomData_Point_H_
11 #include "GeomDataAPI_Point.h"
12 #include <TDataStd_RealArray.hxx>
13 #include <TDataStd_ExtStringArray.hxx>
14 #include <TDataStd_BooleanArray.hxx>
15 #include <TDF_Label.hxx>
17 /**\class GeomData_Point
19 * \brief Attribute that contains 3D point.
22 class GeomData_Point : public GeomDataAPI_Point
24 Handle_TDataStd_RealArray myCoords; ///< X, Y and Z doubles as real array attribute [0; 2]
25 Handle_TDataStd_ExtStringArray myTextArray; ///< Text representation of the X, Y and Z attributes [0; 2]
26 Handle_TDataStd_BooleanArray myExpressionInvalidArray; ///< Flag of invalid expression of the X, Y and Z attributes [0; 2]
28 /// Defines the double value
29 GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
31 GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint);
33 /// Returns the X double value
34 GEOMDATA_EXPORT virtual double x() const;
35 /// Returns the Y double value
36 GEOMDATA_EXPORT virtual double y() const;
37 /// Returns the Z double value
38 GEOMDATA_EXPORT virtual double z() const;
39 /// Returns the 3D point
40 GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Pnt> pnt();
42 /// Defines the text values
43 GEOMDATA_EXPORT virtual void setText(const std::string& theX,
44 const std::string& theY,
45 const std::string& theZ);
47 /// Returns the X text value
48 GEOMDATA_EXPORT virtual std::string textX();
49 /// Returns the Y text value
50 GEOMDATA_EXPORT virtual std::string textY();
51 /// Returns the Z text value
52 GEOMDATA_EXPORT virtual std::string textZ();
54 /// Allows to set expression (text) as invalid (by the parameters listener)
55 GEOMDATA_EXPORT virtual void setExpressionInvalid(int, const bool theFlag);
57 /// Returns true if text is invalid
58 GEOMDATA_EXPORT virtual bool expressionInvalid(int);
61 /// Initializes attributes
62 GEOMDATA_EXPORT GeomData_Point(TDF_Label& theLabel);
64 friend class Model_Data;