0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / BRepTest / BRepTest_Objects.hxx
1 // Created on: 2018/03/21
2 // Created by: Eugeny MALTCHIKOV
3 // Copyright (c) 2018 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
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.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _BRepTest_Objects_HeaderFile
17 #define _BRepTest_Objects_HeaderFile
18
19 #include <BRepTools_History.hxx>
20
21 //! Provides the access to the useful tools common for the algorithms.
22 class BRepTest_Objects
23 {
24 public:
25
26   //! Sets the given history into the session.
27   Standard_EXPORT static void SetHistory(const Handle(BRepTools_History)& theHistory);
28
29   //! Adds the given history to the history in the session.
30   Standard_EXPORT static void AddHistory(const Handle(BRepTools_History)& theHistory);
31
32   //! Sets the history of the given algorithm into the session.
33   template <class TheAlgo>
34   static void SetHistory(const TopTools_ListOfShape& theArguments,
35                          TheAlgo& theAlgo)
36   {
37     SetHistory(new BRepTools_History(theArguments, theAlgo));
38   }
39
40   //! Adds the history of the given algorithm into the session.
41   template <class TheAlgo>
42   static void AddHistory(const TopTools_ListOfShape& theArguments,
43                          TheAlgo& theAlgo)
44   {
45     AddHistory(new BRepTools_History(theArguments, theAlgo));
46   }
47
48   //! Returns the history from the session.
49   Standard_EXPORT static Handle(BRepTools_History) History();
50
51   //! Enables/Disables the history saving
52   Standard_EXPORT static void SetToFillHistory(const Standard_Boolean theFillHist);
53
54   //! Returns the flag controlling the history collection
55   Standard_EXPORT static Standard_Boolean IsHistoryNeeded();
56
57 };
58
59 #endif