+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: GeomAlgoAPI_MakeShape.h
// Created: 17 Oct 2014
// Author: Sergey ZARITCHNY
#define GeomAlgoAPI_MakeShape_H_
#include <GeomAPI_Shape.h>
-#include <boost/shared_ptr.hpp>
#include <GeomAlgoAPI.h>
-#include <BRepBuilderAPI_MakeShape.hxx>
+
+#include <list>
+#include <memory>
+
/**\class GeomAlgoAPI_MakeShape
- * \ingroup DataModel
- * \Interface to the root class of all topological shapes constructions
+ * \ingroup DataAlgo
+ * \brief Interface to the root class of all topological shapes constructions
*/
-class GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape
+class GeomAlgoAPI_MakeShape : public GeomAPI_Interface
{
- public:
- /// Constructor
- GeomAlgoAPI_MakeShape(BRepBuilderAPI_MakeShape * theBuilder);
+public:
+ /// Algo type enum
+ enum AlgoType {
+ MakeShape,
+ MakePipe,
+ BOPAlgoBuilder
+ };
+
+public:
+ /// Constructor by the already stored builder in the interface
+ GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, const AlgoType theAlgoType = MakeShape);
+
+ /// Constructor by the builder and wire. Used for pipe builder.
+ GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder,
+ const std::shared_ptr<GeomAPI_Shape> theWire,
+ const std::shared_ptr<GeomAPI_Shape> theBaseShape);
+
/// Returns a shape built by the shape construction algorithm
- const boost::shared_ptr<GeomAPI_Shape> shape() const;
+ GEOMALGOAPI_EXPORT virtual const std::shared_ptr<GeomAPI_Shape> shape() const;
- /// Returns the list of shapes generated from the shape <theShape>
- virtual const ListOfShape& generated(const boost::shared_ptr<GeomAPI_Shape> theShape);
+ /// Returns the list of shapes generated from the shape \a theShape
+ GEOMALGOAPI_EXPORT virtual void generated(
+ const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
- /// Returns the list of shapes modified from the shape <theShape>
- virtual const ListOfShape& modified(const boost::shared_ptr<GeomAPI_Shape> theShape);
+ /// Returns the list of shapes modified from the shape \a theShape
+ GEOMALGOAPI_EXPORT virtual void modified(
+ const std::shared_ptr<GeomAPI_Shape> theShape, ListOfShape& theHistory);
- /// Returns whether the shape is an edge
- virtual bool isDeleted(const boost::shared_ptr<GeomAPI_Shape> theShape);
+ /// Returns whether the shape is deleted
+ GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
- protected:
- boost::shared_ptr<GeomAPI_Shape> myShape;
- ListOfShape myHistory;
- BRepBuilderAPI_MakeShape * myBuilder;
+protected:
+ GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(){};
+
+protected:
+ GeomAlgoAPI_MakeShape::AlgoType myAlgoType; ///< Type of make shape algo.
+ std::shared_ptr<GeomAPI_Shape> myShape; ///< Resulting shape.
+ std::shared_ptr<GeomAPI_Shape> myWire; ///< Wire for pipe algo.
+ std::shared_ptr<GeomAPI_Shape> myBaseShape; ///< Base shape of algo.
};
-#endif
\ No newline at end of file
+typedef std::list<std::shared_ptr<GeomAlgoAPI_MakeShape> > ListOfMakeShape;
+
+#endif