Salome HOME
Added CPP High API for FeaturesPlugin_Pipe
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Pipe.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Pipe.h
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesAPI_Pipe_H_
8 #define FeaturesAPI_Pipe_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Pipe.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Selection;
18
19 /// \class FeaturesAPI_Pipe
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for Pipe feature.
22 class FeaturesAPI_Pipe: public ModelHighAPI_Interface
23 {
24 public:
25   /// Constructor without values.
26   FEATURESAPI_EXPORT
27   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature);
28
29   /// Constructor with values.
30   FEATURESAPI_EXPORT
31   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
33                             const ModelHighAPI_Selection& thePath);
34
35   /// Constructor with values.
36   FEATURESAPI_EXPORT
37   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
38                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
39                             const ModelHighAPI_Selection& thePath,
40                             const ModelHighAPI_Selection& theBiNoramal);
41
42   /// Constructor with values.
43   FEATURESAPI_EXPORT
44   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
45                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
46                             const ModelHighAPI_Selection& thePath,
47                             const std::list<ModelHighAPI_Selection>& theLocations);
48
49   /// Destructor.
50   FEATURESAPI_EXPORT
51   virtual ~FeaturesAPI_Pipe();
52
53   INTERFACE_5(FeaturesPlugin_Pipe::ID(),
54               baseObjects, FeaturesPlugin_Pipe::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
55               path, FeaturesPlugin_Pipe::PATH_OBJECT_ID(), ModelAPI_AttributeSelection, /** Path */,
56               creationMethod, FeaturesPlugin_Pipe::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
57               biNormal, FeaturesPlugin_Pipe::BINORMAL_ID(), ModelAPI_AttributeSelection, /** Bi-Normal */,
58               locations, FeaturesPlugin_Pipe::LOCATIONS_ID(), ModelAPI_AttributeSelectionList, /** Locations */)
59
60   /// Modify base attribute of the feature.
61   FEATURESAPI_EXPORT
62   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
63
64   /// Modify path attribute of the feature.
65   FEATURESAPI_EXPORT
66   void setPath(const ModelHighAPI_Selection& thePath);
67
68   /// Modify creation method, base and path.
69   FEATURESAPI_EXPORT
70   void setByBasePath(const std::list<ModelHighAPI_Selection>& theBaseObjects,
71                      const ModelHighAPI_Selection& thePath);
72
73   /// Modify creation method, base, path and bi-normal.
74   FEATURESAPI_EXPORT
75   void setByBasePathBiNormal(const std::list<ModelHighAPI_Selection>& theBaseObjects,
76                              const ModelHighAPI_Selection& thePath,
77                              const ModelHighAPI_Selection& theBiNoramal);
78
79   /// Modify creation method, base, path and locations.
80   FEATURESAPI_EXPORT
81   void setByBasePathLocations(const std::list<ModelHighAPI_Selection>& theBaseObjects,
82                               const ModelHighAPI_Selection& thePath,
83                               const std::list<ModelHighAPI_Selection>& theLocations);
84 };
85
86 /// Pointer on Pipe object.
87 typedef std::shared_ptr<FeaturesAPI_Pipe> PipePtr;
88
89 /// \ingroup CPPHighAPI
90 /// \brief Create Pipe feature.
91 FEATURESAPI_EXPORT
92 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
93                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
94                 const ModelHighAPI_Selection& thePath);
95
96 /// \ingroup CPPHighAPI
97 /// \brief Create Pipe feature.
98 FEATURESAPI_EXPORT
99 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
100                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
101                 const ModelHighAPI_Selection& thePath,
102                 const ModelHighAPI_Selection& theBiNoramal);
103
104 /// \ingroup CPPHighAPI
105 /// \brief Create Pipe feature.
106 FEATURESAPI_EXPORT
107 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
108                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
109                 const ModelHighAPI_Selection& thePath,
110                 const std::list<ModelHighAPI_Selection>& theLocations);
111
112 #endif // FeaturesAPI_Pipe_H_