Salome HOME
Issue #2307: 1.1.2.5 Remove Sub-Shapes mode
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Pipe.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef FeaturesAPI_Pipe_H_
22 #define FeaturesAPI_Pipe_H_
23
24 #include "FeaturesAPI.h"
25
26 #include <FeaturesPlugin_Pipe.h>
27
28 #include <ModelHighAPI_Interface.h>
29 #include <ModelHighAPI_Macro.h>
30
31 class ModelHighAPI_Dumper;
32 class ModelHighAPI_Selection;
33
34 /// \class FeaturesAPI_Pipe
35 /// \ingroup CPPHighAPI
36 /// \brief Interface for Pipe feature.
37 class FeaturesAPI_Pipe: public ModelHighAPI_Interface
38 {
39 public:
40   /// Constructor without values.
41   FEATURESAPI_EXPORT
42   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature);
43
44   /// Constructor with values.
45   FEATURESAPI_EXPORT
46   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
47                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
48                             const ModelHighAPI_Selection& thePath);
49
50   /// Constructor with values.
51   FEATURESAPI_EXPORT
52   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
53                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
54                             const ModelHighAPI_Selection& thePath,
55                             const ModelHighAPI_Selection& theBiNoramal);
56
57   /// Constructor with values.
58   FEATURESAPI_EXPORT
59   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
60                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
61                             const ModelHighAPI_Selection& thePath,
62                             const std::list<ModelHighAPI_Selection>& theLocations);
63
64   /// Destructor.
65   FEATURESAPI_EXPORT
66   virtual ~FeaturesAPI_Pipe();
67
68   INTERFACE_5(FeaturesPlugin_Pipe::ID(),
69               baseObjects, FeaturesPlugin_Pipe::BASE_OBJECTS_ID(),
70               ModelAPI_AttributeSelectionList, /** Base objects */,
71               path, FeaturesPlugin_Pipe::PATH_OBJECT_ID(),
72               ModelAPI_AttributeSelection, /** Path */,
73               creationMethod, FeaturesPlugin_Pipe::CREATION_METHOD(),
74               ModelAPI_AttributeString, /** Creation method */,
75               biNormal, FeaturesPlugin_Pipe::BINORMAL_ID(),
76               ModelAPI_AttributeSelection, /** Bi-Normal */,
77               locations, FeaturesPlugin_Pipe::LOCATIONS_ID(),
78               ModelAPI_AttributeSelectionList, /** Locations */)
79
80   /// Modify base attribute of the feature.
81   FEATURESAPI_EXPORT
82   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
83
84   /// Modify path attribute of the feature.
85   FEATURESAPI_EXPORT
86   void setPath(const ModelHighAPI_Selection& thePath);
87
88   /// Modify creation method, base and path.
89   FEATURESAPI_EXPORT
90   void setByBasePath(const std::list<ModelHighAPI_Selection>& theBaseObjects,
91                      const ModelHighAPI_Selection& thePath);
92
93   /// Modify creation method, base, path and bi-normal.
94   FEATURESAPI_EXPORT
95   void setByBasePathBiNormal(const std::list<ModelHighAPI_Selection>& theBaseObjects,
96                              const ModelHighAPI_Selection& thePath,
97                              const ModelHighAPI_Selection& theBiNoramal);
98
99   /// Modify creation method, base, path and locations.
100   FEATURESAPI_EXPORT
101   void setByBasePathLocations(const std::list<ModelHighAPI_Selection>& theBaseObjects,
102                               const ModelHighAPI_Selection& thePath,
103                               const std::list<ModelHighAPI_Selection>& theLocations);
104
105   /// Dump wrapped feature
106   FEATURESAPI_EXPORT
107   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
108 };
109
110 /// Pointer on Pipe object.
111 typedef std::shared_ptr<FeaturesAPI_Pipe> PipePtr;
112
113 /// \ingroup CPPHighAPI
114 /// \brief Create Pipe feature.
115 FEATURESAPI_EXPORT
116 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
117                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
118                 const ModelHighAPI_Selection& thePath);
119
120 /// \ingroup CPPHighAPI
121 /// \brief Create Pipe feature.
122 FEATURESAPI_EXPORT
123 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
124                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
125                 const ModelHighAPI_Selection& thePath,
126                 const ModelHighAPI_Selection& theBiNoramal);
127
128 /// \ingroup CPPHighAPI
129 /// \brief Create Pipe feature.
130 FEATURESAPI_EXPORT
131 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
132                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
133                 const ModelHighAPI_Selection& thePath,
134                 const std::list<ModelHighAPI_Selection>& theLocations);
135
136 #endif // FeaturesAPI_Pipe_H_