Salome HOME
Dump names of features copied in Multi-Translation, Multi-Rotation and Mirror macro...
[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 ModelAPI_Feature;
19 //--------------------------------------------------------------------------------------
20 /**\class SketchAPI_SketchEntity
21  * \ingroup CPPHighAPI
22  * \brief Base class for Sketch feature interfaces
23  */
24 class SketchAPI_SketchEntity : public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values
28   SKETCHAPI_EXPORT
29   explicit SketchAPI_SketchEntity(const std::shared_ptr<ModelAPI_Feature> & theFeature);
30   /// Destructor
31   SKETCHAPI_EXPORT
32   virtual ~SketchAPI_SketchEntity();
33
34   /// Auxiliary
35   SKETCHAPI_EXPORT
36   std::shared_ptr<ModelAPI_AttributeBoolean> auxiliary() const;
37
38   /// Set auxiliary
39   SKETCHAPI_EXPORT
40   void setAuxiliary(bool theAuxiliary);
41
42   /// Dump wrapped feature
43   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
44
45   /// Convert list of features to list of appropriate wrappers
46   SKETCHAPI_EXPORT
47   static std::list<std::shared_ptr<ModelHighAPI_Interface> >
48   wrap(const std::list<std::shared_ptr<ModelAPI_Feature> >& theFeatures);
49
50 protected:
51   std::shared_ptr<ModelAPI_AttributeBoolean> myAuxiliary;
52
53   bool initialize();
54
55   /// Check the entity is a copy of another feature
56   bool isCopy() const;
57 };
58
59 //! Pointer on SketchEntity object
60 typedef std::shared_ptr<SketchAPI_SketchEntity> SketchEntityPtr;
61
62 //--------------------------------------------------------------------------------------
63 //--------------------------------------------------------------------------------------
64 #endif /* SRC_SKETCHAPI_SKETCHAPI_SKETCHENTITY_H_ */