1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomDataAPI_Point.h
4 // Created: 24 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomDataAPI_Point_H_
8 #define GeomDataAPI_Point_H_
10 #include "GeomDataAPI.h"
11 #include <ModelAPI_Attribute.h>
15 /**\class GeomDataAPI_Point
17 * \brief Attribute that contains 3D point coordinates.
20 class GeomDataAPI_Point : public ModelAPI_Attribute
23 /// Defines the double value
24 GEOMDATAAPI_EXPORT virtual void setValue(const double theX, const double theY, const double theZ) = 0;
26 GEOMDATAAPI_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint) = 0;
28 /// Returns the X double value
29 GEOMDATAAPI_EXPORT virtual double x() const = 0;
30 /// Returns the Y double value
31 GEOMDATAAPI_EXPORT virtual double y() const = 0;
32 /// Returns the Z double value
33 GEOMDATAAPI_EXPORT virtual double z() const = 0;
34 /// Returns the 3D point
35 GEOMDATAAPI_EXPORT virtual std::shared_ptr<GeomAPI_Pnt> pnt() = 0;
37 /// Defines the double values
38 GEOMDATAAPI_EXPORT virtual void setText(const std::string& theX,
39 const std::string& theY,
40 const std::string& theZ) = 0;
42 /// Returns the double values
43 GEOMDATAAPI_EXPORT virtual std::string textX() = 0;
44 GEOMDATAAPI_EXPORT virtual std::string textY() = 0;
45 GEOMDATAAPI_EXPORT virtual std::string textZ() = 0;
47 enum PointComponent { C_X = 0,
52 /// Allows to set expression (text) as invalid (by the parameters listener)
53 GEOMDATAAPI_EXPORT virtual void setExpressionInvalid(int theComponent, const bool theFlag) = 0;
55 /// Returns true if text is invalid
56 GEOMDATAAPI_EXPORT virtual bool expressionInvalid(int theComponent) = 0;
58 /// Returns the type of this class of attributes
59 static std::string typeId()
61 return std::string("Point");
64 /// Returns the type of this class of attributes, not static method
65 GEOMDATAAPI_EXPORT virtual std::string attributeType();
68 /// Objects are created for features automatically
69 GEOMDATAAPI_EXPORT GeomDataAPI_Point();
70 GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Point();