Salome HOME
Dump Python in the High Level Parameterized Geometry API (issue #1648)
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShape.h
index b5e40ef2439bc5c0fd97618c01c5ff7d133a671a..6fc03c6f8683246ddfdfac6a95786288d024fa66 100644 (file)
@@ -3,6 +3,9 @@
 // File:        GeomAlgoAPI_MakeShape.h
 // Created:     17 Oct 2014
 // Author:      Sergey ZARITCHNY
+//
+// Modified by Clarisse Genrault (CEA) : 17 Mar 2016
+
 #ifndef GeomAlgoAPI_MakeShape_H_
 #define GeomAlgoAPI_MakeShape_H_
 
@@ -11,6 +14,8 @@
 
 #include <list>
 #include <memory>
+#include <map>
+#include <string>
 
 /// \class GeomAlgoAPI_MakeShape
 /// \ingroup DataAlgo
@@ -80,6 +85,21 @@ public:
   /// \param[in] theShape base shape.
   GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
 
+  /// \return true if the data were correct.
+  GEOMALGOAPI_EXPORT virtual bool check() { return true; };
+
+  ///  \return the list of created faces.
+  GEOMALGOAPI_EXPORT std::map< std::string, std::shared_ptr<GeomAPI_Shape> > getCreatedFaces() {return myCreatedFaces;}
+
+  /// \return the error.
+  GEOMALGOAPI_EXPORT std::string getError() { return myError; }
+
+  /// \brief Prepare the naming of faces.
+  GEOMALGOAPI_EXPORT virtual void prepareNamingFaces();
+
+  /// \brief Check the validity of the produced shape.
+  GEOMALGOAPI_EXPORT bool checkValid(std::string theMessage);
+
 protected:
   /// \brief Sets builder type.
   /// \param[in] theBuilderType new builder type.
@@ -93,6 +113,11 @@ protected:
   /// \param[in] theShape new shape.
   void setShape(const std::shared_ptr<GeomAPI_Shape> theShape);
 
+protected:
+  std::shared_ptr<GeomAPI_DataMapOfShapeShape> myMap; ///< Data map to keep correct orientation of sub-shapes.
+  std::string myError; /// Error occurred during the execution of an algorithm.
+  std::map< std::string, std::shared_ptr<GeomAPI_Shape> > myCreatedFaces; /// Map of created faces with their name for naming.
+  
 private:
   /// \brief Initializes internals.
   void initialize();
@@ -101,7 +126,6 @@ private:
   GeomAlgoAPI_MakeShape::BuilderType myBuilderType; ///< Type of make shape builder.
   bool myDone; ///< Builder status.
   std::shared_ptr<GeomAPI_Shape> myShape; ///< Resulting shape.
-  std::shared_ptr<GeomAPI_DataMapOfShapeShape> myMap; ///< Data map to keep correct orientation of sub-shapes.
 };
 
 typedef std::list<std::shared_ptr<GeomAlgoAPI_MakeShape> > ListOfMakeShape;