Salome HOME
Issue #1834: Fix length of lines
[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_Dumper;
18 class ModelHighAPI_Selection;
19
20 /// \class FeaturesAPI_Pipe
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Pipe feature.
23 class FeaturesAPI_Pipe: public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values.
27   FEATURESAPI_EXPORT
28   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29
30   /// Constructor with values.
31   FEATURESAPI_EXPORT
32   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
34                             const ModelHighAPI_Selection& thePath);
35
36   /// Constructor with values.
37   FEATURESAPI_EXPORT
38   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
39                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
40                             const ModelHighAPI_Selection& thePath,
41                             const ModelHighAPI_Selection& theBiNoramal);
42
43   /// Constructor with values.
44   FEATURESAPI_EXPORT
45   explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
46                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
47                             const ModelHighAPI_Selection& thePath,
48                             const std::list<ModelHighAPI_Selection>& theLocations);
49
50   /// Destructor.
51   FEATURESAPI_EXPORT
52   virtual ~FeaturesAPI_Pipe();
53
54   INTERFACE_5(FeaturesPlugin_Pipe::ID(),
55               baseObjects, FeaturesPlugin_Pipe::BASE_OBJECTS_ID(),
56               ModelAPI_AttributeSelectionList, /** Base objects */,
57               path, FeaturesPlugin_Pipe::PATH_OBJECT_ID(),
58               ModelAPI_AttributeSelection, /** Path */,
59               creationMethod, FeaturesPlugin_Pipe::CREATION_METHOD(),
60               ModelAPI_AttributeString, /** Creation method */,
61               biNormal, FeaturesPlugin_Pipe::BINORMAL_ID(),
62               ModelAPI_AttributeSelection, /** Bi-Normal */,
63               locations, FeaturesPlugin_Pipe::LOCATIONS_ID(),
64               ModelAPI_AttributeSelectionList, /** Locations */)
65
66   /// Modify base attribute of the feature.
67   FEATURESAPI_EXPORT
68   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
69
70   /// Modify path attribute of the feature.
71   FEATURESAPI_EXPORT
72   void setPath(const ModelHighAPI_Selection& thePath);
73
74   /// Modify creation method, base and path.
75   FEATURESAPI_EXPORT
76   void setByBasePath(const std::list<ModelHighAPI_Selection>& theBaseObjects,
77                      const ModelHighAPI_Selection& thePath);
78
79   /// Modify creation method, base, path and bi-normal.
80   FEATURESAPI_EXPORT
81   void setByBasePathBiNormal(const std::list<ModelHighAPI_Selection>& theBaseObjects,
82                              const ModelHighAPI_Selection& thePath,
83                              const ModelHighAPI_Selection& theBiNoramal);
84
85   /// Modify creation method, base, path and locations.
86   FEATURESAPI_EXPORT
87   void setByBasePathLocations(const std::list<ModelHighAPI_Selection>& theBaseObjects,
88                               const ModelHighAPI_Selection& thePath,
89                               const std::list<ModelHighAPI_Selection>& theLocations);
90
91   /// Dump wrapped feature
92   FEATURESAPI_EXPORT
93   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
94 };
95
96 /// Pointer on Pipe object.
97 typedef std::shared_ptr<FeaturesAPI_Pipe> PipePtr;
98
99 /// \ingroup CPPHighAPI
100 /// \brief Create Pipe feature.
101 FEATURESAPI_EXPORT
102 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
103                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
104                 const ModelHighAPI_Selection& thePath);
105
106 /// \ingroup CPPHighAPI
107 /// \brief Create Pipe feature.
108 FEATURESAPI_EXPORT
109 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
110                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
111                 const ModelHighAPI_Selection& thePath,
112                 const ModelHighAPI_Selection& theBiNoramal);
113
114 /// \ingroup CPPHighAPI
115 /// \brief Create Pipe feature.
116 FEATURESAPI_EXPORT
117 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
118                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
119                 const ModelHighAPI_Selection& thePath,
120                 const std::list<ModelHighAPI_Selection>& theLocations);
121
122 #endif // FeaturesAPI_Pipe_H_