Salome HOME
updated copyright message
[modules/shaper.git] / src / Model / Model_Document.h
index 5239524e14d71839ae7c8fc185343f6f5bd26efe..1dec08f14434d02d8557ee83fd2b936cb8f6dabe 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  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
@@ -106,6 +106,8 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual bool canRedo();
   //! Redoes last operation
   MODEL_EXPORT virtual void redo();
+  //! Clears undo/redo lists
+  MODEL_EXPORT virtual void clearUndoRedo();
 
   //! Adds to the document the new feature of the given feature id
   //! \param theID creates feature and puts it in the document
@@ -284,7 +286,9 @@ class Model_Document : public ModelAPI_Document
   int numberOfNameInHistory(const ObjectPtr& theNameObject, const TDF_Label& theStartFrom);
   //! Returns the result by name of the result (names of results must be unique, used for naming
   //! selection by name.
-  ResultPtr findByName(std::wstring& theName, std::wstring& theSubShapeName, bool& theUniqueContext);
+  ResultPtr findByName(std::wstring& theName,
+                       std::wstring& theSubShapeName,
+                       bool& theUniqueContext);
 
   ///! Returns all features of the document including the hidden features which are not in
   ///! history. Not very fast method, for calling once, not in big cycles.
@@ -323,6 +327,9 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> nextFeature(
     std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theReverse = false) const;
 
+  //! Erases the document structure.
+  ~Model_Document();
+
  protected:
   //! Returns (creates if needed) the general label
   TDF_Label generalLabel() const;