1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef FeaturesAPI_Pipe_H_
22 #define FeaturesAPI_Pipe_H_
24 #include "FeaturesAPI.h"
26 #include <FeaturesPlugin_Pipe.h>
28 #include <ModelHighAPI_Interface.h>
29 #include <ModelHighAPI_Macro.h>
31 class ModelHighAPI_Dumper;
32 class ModelHighAPI_Selection;
34 /// \class FeaturesAPI_Pipe
35 /// \ingroup CPPHighAPI
36 /// \brief Interface for Pipe feature.
37 class FeaturesAPI_Pipe: public ModelHighAPI_Interface
40 /// Constructor without values.
42 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature);
44 /// Constructor with values.
46 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
47 const std::list<ModelHighAPI_Selection>& theBaseObjects,
48 const ModelHighAPI_Selection& thePath);
50 /// Constructor with values.
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);
57 /// Constructor with values.
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);
66 virtual ~FeaturesAPI_Pipe();
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 */)
80 /// Modify base attribute of the feature.
82 void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
84 /// Modify path attribute of the feature.
86 void setPath(const ModelHighAPI_Selection& thePath);
88 /// Modify creation method, base and path.
90 void setByBasePath(const std::list<ModelHighAPI_Selection>& theBaseObjects,
91 const ModelHighAPI_Selection& thePath);
93 /// Modify creation method, base, path and bi-normal.
95 void setByBasePathBiNormal(const std::list<ModelHighAPI_Selection>& theBaseObjects,
96 const ModelHighAPI_Selection& thePath,
97 const ModelHighAPI_Selection& theBiNoramal);
99 /// Modify creation method, base, path and locations.
101 void setByBasePathLocations(const std::list<ModelHighAPI_Selection>& theBaseObjects,
102 const ModelHighAPI_Selection& thePath,
103 const std::list<ModelHighAPI_Selection>& theLocations);
105 /// Dump wrapped feature
107 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
110 /// Pointer on Pipe object.
111 typedef std::shared_ptr<FeaturesAPI_Pipe> PipePtr;
113 /// \ingroup CPPHighAPI
114 /// \brief Create Pipe feature.
116 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
117 const std::list<ModelHighAPI_Selection>& theBaseObjects,
118 const ModelHighAPI_Selection& thePath);
120 /// \ingroup CPPHighAPI
121 /// \brief Create Pipe feature.
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);
128 /// \ingroup CPPHighAPI
129 /// \brief Create Pipe feature.
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);
136 #endif // FeaturesAPI_Pipe_H_