Salome HOME
Use full attribute type name in INTERFACE_N
[modules/shaper.git] / src / ConstructionAPI / ConstructionAPI_Point.h
1 // Name   : ConstructionAPI_Point.h
2 // Purpose: 
3 //
4 // History:
5 // 29/03/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
8 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ConstructionAPI.h"
12
13 #include <ConstructionPlugin_Point.h>
14
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 class ModelAPI_AttributeDouble;
19 class ModelAPI_Document;
20 class ModelHighAPI_Double;
21 //--------------------------------------------------------------------------------------
22 /**\class ConstructionAPI_Point
23  * \ingroup CPPHighAPI
24  * \brief Interface for Point feature
25  */
26 class ConstructionAPI_Point : public ModelHighAPI_Interface
27 {
28 public:
29   /// Constructor without values
30   CONSTRUCTIONAPI_EXPORT
31   explicit ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature);
32   /// Constructor with values
33   CONSTRUCTIONAPI_EXPORT
34   ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
35                         const ModelHighAPI_Double & theX,
36                         const ModelHighAPI_Double & theY,
37                         const ModelHighAPI_Double & theZ);
38   /// Destructor
39   CONSTRUCTIONAPI_EXPORT
40   virtual ~ConstructionAPI_Point();
41
42   INTERFACE_3(ConstructionPlugin_Point::ID(),
43               x, ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble, /** X attribute */,
44               y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */,
45               z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */)
46
47   /// Set point values
48   CONSTRUCTIONAPI_EXPORT
49   void setPoint(const ModelHighAPI_Double & theX,
50                 const ModelHighAPI_Double & theY,
51                 const ModelHighAPI_Double & theZ);
52 };
53
54 //! Pointer on Point object
55 typedef std::shared_ptr<ConstructionAPI_Point> PointPtr;
56
57 /**\ingroup CPPHighAPI
58  * \brief Create Point feature
59  */
60 CONSTRUCTIONAPI_EXPORT
61 PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
62                   const ModelHighAPI_Double & theX,
63                   const ModelHighAPI_Double & theY,
64                   const ModelHighAPI_Double & theZ);
65
66 //--------------------------------------------------------------------------------------
67 //--------------------------------------------------------------------------------------
68 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */