Salome HOME
Cleare Macros for easy atribute initialization in C++HighAPI interfaces
[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 <ModelHighAPI_Interface.h>
14 #include <ModelHighAPI_Macro.h>
15 //--------------------------------------------------------------------------------------
16 class ModelAPI_AttributeDouble;
17 class ModelAPI_Document;
18 class ModelHighAPI_Double;
19 //--------------------------------------------------------------------------------------
20 /**\class ConstructionAPI_Point
21  * \ingroup CPPHighAPI
22  * \brief Interface for Point feature
23  */
24 class ConstructionAPI_Point : public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values
28   explicit ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature);
29   /// Constructor with values
30   ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
31                         const ModelHighAPI_Double & theX,
32                         const ModelHighAPI_Double & theY,
33                         const ModelHighAPI_Double & theZ);
34   /// Destructor
35   virtual ~ConstructionAPI_Point();
36
37   INTERFACE_3("Point",
38               x, "x", Double, /** X attribute */,
39               y, "y", Double, /** Y attribute */,
40               z, "z", Double, /** Z attribute */)
41
42   /// Set point values
43   void setPoint(const ModelHighAPI_Double & theX,
44                 const ModelHighAPI_Double & theY,
45                 const ModelHighAPI_Double & theZ);
46 };
47
48 //! Pointer on Point object
49 typedef std::shared_ptr<ConstructionAPI_Point> PointPtr;
50
51 /**\ingroup CPPHighAPI
52  * \brief Create Point feature
53  */
54 PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
55                   const ModelHighAPI_Double & theX,
56                   const ModelHighAPI_Double & theY,
57                   const ModelHighAPI_Double & theZ);
58
59 //--------------------------------------------------------------------------------------
60 //--------------------------------------------------------------------------------------
61 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */