1 // Created on: 2018/03/21
2 // Created by: Eugeny MALTCHIKOV
3 // Copyright (c) 2018 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _BRepTest_Objects_HeaderFile
17 #define _BRepTest_Objects_HeaderFile
19 #include <BRepTools_History.hxx>
21 //! Provides the access to the useful tools common for the algorithms.
22 class BRepTest_Objects
26 //! Sets the given history into the session.
27 Standard_EXPORT static void SetHistory(const Handle(BRepTools_History)& theHistory);
29 //! Adds the given history to the history in the session.
30 Standard_EXPORT static void AddHistory(const Handle(BRepTools_History)& theHistory);
32 //! Sets the history of the given algorithm into the session.
33 template <class TheAlgo>
34 static void SetHistory(const TopTools_ListOfShape& theArguments,
37 SetHistory(new BRepTools_History(theArguments, theAlgo));
40 //! Adds the history of the given algorithm into the session.
41 template <class TheAlgo>
42 static void AddHistory(const TopTools_ListOfShape& theArguments,
45 AddHistory(new BRepTools_History(theArguments, theAlgo));
48 //! Returns the history from the session.
49 Standard_EXPORT static Handle(BRepTools_History) History();
51 //! Enables/Disables the history saving
52 Standard_EXPORT static void SetToFillHistory(const Standard_Boolean theFillHist);
54 //! Returns the flag controlling the history collection
55 Standard_EXPORT static Standard_Boolean IsHistoryNeeded();