Salome HOME
Dump Python in the High Level Parameterized Geometry API (issue #1648)
[modules/shaper.git] / src / SketchAPI / SketchAPI_SketchEntity.h
1 // Name   : SketchAPI_SketchEntity.h
2 // Purpose: 
3 //
4 // History:
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_SKETCHAPI_SKETCHAPI_SKETCHENTITY_H_
8 #define SRC_SKETCHAPI_SKETCHAPI_SKETCHENTITY_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "SketchAPI.h"
12
13 #include <SketchPlugin_SketchEntity.h>
14
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 /**\class SketchAPI_SketchEntity
19  * \ingroup CPPHighAPI
20  * \brief Base class for Sketch feature interfaces
21  */
22 class SketchAPI_SketchEntity : public ModelHighAPI_Interface
23 {
24 public:
25   /// Constructor without values
26   SKETCHAPI_EXPORT
27   explicit SketchAPI_SketchEntity(const std::shared_ptr<ModelAPI_Feature> & theFeature);
28   /// Destructor
29   SKETCHAPI_EXPORT
30   virtual ~SketchAPI_SketchEntity();
31
32   /// Auxiliary
33   SKETCHAPI_EXPORT
34   std::shared_ptr<ModelAPI_AttributeBoolean> auxiliary() const;
35
36   /// Set auxiliary
37   SKETCHAPI_EXPORT
38   void setAuxiliary(bool theAuxiliary);
39
40   /// Dump wrapped feature
41   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
42
43 protected:
44   std::shared_ptr<ModelAPI_AttributeBoolean> myAuxiliary;
45
46   bool initialize();
47
48   /// Check the entity is a copy of another feature
49   bool isCopy() const;
50 };
51
52 //! Pointer on SketchEntity object
53 typedef std::shared_ptr<SketchAPI_SketchEntity> SketchEntityPtr;
54
55 //--------------------------------------------------------------------------------------
56 //--------------------------------------------------------------------------------------
57 #endif /* SRC_SKETCHAPI_SKETCHAPI_SKETCHENTITY_H_ */