Salome HOME
Issue #901 - It is possible to define empty name for parameter
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultBody.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_ResultBody.cpp
4 // Created:     07 Jul 2014
5 // Author:      Mikhail PONIKAROV
6
7 #include "ModelAPI_ResultBody.h"
8 #include <ModelAPI_BodyBuilder.h>
9
10 ModelAPI_ResultBody::ModelAPI_ResultBody()
11 : myBuilder(0)
12 {
13 }
14
15 ModelAPI_ResultBody::~ModelAPI_ResultBody()
16 {
17   if (myBuilder)
18   delete myBuilder;
19 }
20
21 std::string ModelAPI_ResultBody::groupName()
22 {
23   return group();
24 }
25
26 void ModelAPI_ResultBody::store(const std::shared_ptr<GeomAPI_Shape>& theShape)
27 {
28   myBuilder->store(theShape);
29 }
30
31 void ModelAPI_ResultBody::storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
32                                   const std::shared_ptr<GeomAPI_Shape>& theToShape)
33 {
34   myBuilder->storeGenerated(theFromShape, theToShape);
35 }
36
37 void ModelAPI_ResultBody::storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
38                                   const std::shared_ptr<GeomAPI_Shape>& theNewShape,
39                             const int theDecomposeSolidsTag)
40 {
41   myBuilder->storeModified(theOldShape, theNewShape, theDecomposeSolidsTag);
42 }
43
44 void ModelAPI_ResultBody::storeWithoutNaming(const std::shared_ptr<GeomAPI_Shape>& theShape)
45 {
46   myBuilder->storeWithoutNaming(theShape);
47 }
48
49 std::shared_ptr<GeomAPI_Shape> ModelAPI_ResultBody::shape()
50 {
51   return myBuilder->shape();
52 }
53
54 void ModelAPI_ResultBody::generated(const std::shared_ptr<GeomAPI_Shape>& theNewShape,
55     const std::string& theName, const int theTag)
56 {
57   myBuilder->generated(theNewShape, theName, theTag);
58 }
59
60 void ModelAPI_ResultBody::generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
61     const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName, 
62     const int theTag)
63 {
64   myBuilder->generated(theOldShape, theNewShape, theName, theTag);
65 }
66
67 void ModelAPI_ResultBody::modified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
68     const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName,
69     const int theTag)
70 {
71   myBuilder->modified(theOldShape, theNewShape, theName, theTag);
72 }
73
74
75 void ModelAPI_ResultBody::deleted(
76     const std::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag)
77 {
78   myBuilder->deleted(theOldShape, theTag);
79 }
80   
81 void ModelAPI_ResultBody::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
82                                   std::shared_ptr<GeomAPI_Shape>  theShapeIn,
83                                   const int  theKindOfShape,
84                                   const int  theTag)
85 {
86   myBuilder->loadDeletedShapes(theMS, theShapeIn, theKindOfShape, theTag);
87 }
88
89 void ModelAPI_ResultBody::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
90     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape, const int  theTag,
91     const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes)
92 {
93   myBuilder->loadAndOrientModifiedShapes(
94     theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes);
95 }
96
97 void ModelAPI_ResultBody::loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* theMS,
98     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape,
99     const int  theTag, const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes)
100 {
101   myBuilder->loadAndOrientGeneratedShapes(
102     theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes);
103 }
104
105 void ModelAPI_ResultBody::loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, 
106     const std::string& theName, int&  theTag)
107 {
108   myBuilder->loadFirstLevel(theShape, theName, theTag);
109 }
110
111 void ModelAPI_ResultBody::loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape,
112     const std::string& theName, int&  theTag)
113 {
114   myBuilder->loadDisconnectedEdges(theShape, theName, theTag);
115 }
116
117 void ModelAPI_ResultBody::loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape,
118     const std::string& theName,int&  theTag)
119 {
120   myBuilder->loadDisconnectedVertexes(theShape, theName, theTag);
121 }