Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShapeList.h
index 8d7975071f5ba92fa724022ffdc569c009f6cd47..2ed1af2ea5becaa0dcbafffd416eaa631cfe2e20 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
-// File:        GeomAlgoAPI_MakeShapeList.h
-// Created:     27 May 2015
-// Author:      Dmitry Bobylev
 #ifndef GeomAlgoAPI_MakeShapeList_H_
 #define GeomAlgoAPI_MakeShapeList_H_
 
 
 #include <memory>
 
-/** \class GeomAlgoAPI_MakeShapeList
- *  \ingroup DataAlgo
- *  \brief Interface to the root class of all topological shapes constructions
- */
+/// \class GeomAlgoAPI_MakeShapeList
+/// \ingroup DataAlgo
+/// \brief List of topological shapes constructions
 class GeomAlgoAPI_MakeShapeList : public GeomAlgoAPI_MakeShape
 {
   enum OperationType {
@@ -27,35 +40,41 @@ public:
   /// Default constructor
   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShapeList();
 
-  /** \brief Constructor
-   *  \param[in] theMakeShapeList list of algorithms.
-   */
+  /// \brief Constructor
+  /// \param[in] theMakeShapeList list of algorithms.
   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShapeList(const ListOfMakeShape& theMakeShapeList);
 
-  /** \brief Initializes a class with new list of algorithms.
-   *  \param[in] theMakeShapeList list of algorithms.
-   */
+  /// \brief Initializes a class with new list of algorithms.
+  /// \param[in] theMakeShapeList list of algorithms.
   GEOMALGOAPI_EXPORT void init(const ListOfMakeShape& theMakeShapeList);
 
+  /// \return the list reference
+  GEOMALGOAPI_EXPORT const ListOfMakeShape& list() const;
+
+  /// \brief Adds algo to the end of list.
+  /// \param[in] theMakeShape algo to be added.
+  GEOMALGOAPI_EXPORT void appendAlgo(const GeomMakeShapePtr theMakeShape);
+
   /// \return a shape built by the shape construction algorithms
-  GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape> shape() const;
+  GEOMALGOAPI_EXPORT virtual const GeomShapePtr shape() const;
 
   /// \return the list of shapes generated from the shape \a theShape
-  GEOMALGOAPI_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape> theShape,
+  GEOMALGOAPI_EXPORT virtual void generated(const GeomShapePtr theShape,
                                             ListOfShape& theHistory);
 
   /// \return the list of shapes modified from the shape \a theShape
-  GEOMALGOAPI_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape> theShape,
+  GEOMALGOAPI_EXPORT virtual void modified(const GeomShapePtr theShape,
                                            ListOfShape& theHistory);
 
-private:
-  void result(const std::shared_ptr<GeomAPI_Shape> theShape,
-              ListOfShape& theHistory,
-              OperationType theOperationType);
+  /// \return whether the shape is deleted
+  GEOMALGOAPI_EXPORT virtual bool isDeleted(const GeomShapePtr theShape);
 
+private:
+  void result(const GeomShapePtr theShape,
+              ListOfShape& theHistory);
 
 protected:
-  ListOfMakeShape myMakeShapeList;
+  ListOfMakeShape myListOfMakeShape; ///< List of make shape algos.
 };
 
 #endif