Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:16

0001 // Created on: 2018/03/21
0002 // Created by: Eugeny MALTCHIKOV
0003 // Copyright (c) 2018 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BRepTest_DrawableHistory_HeaderFile
0017 #define _BRepTest_DrawableHistory_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <BRepTools_History.hxx>
0022 
0023 #include <Draw_Drawable3D.hxx>
0024 #include <Draw_Interpretor.hxx>
0025 
0026 #include <Standard_OStream.hxx>
0027 
0028 //! Drawable History object.
0029 //! Allows keeping histories of the algorithms in Draw.
0030 class BRepTest_DrawableHistory : public Draw_Drawable3D
0031 {
0032   DEFINE_STANDARD_RTTIEXT(BRepTest_DrawableHistory, Draw_Drawable3D)
0033 
0034 public:
0035 
0036   //! Creation of the Drawable history.
0037   BRepTest_DrawableHistory(const Handle(BRepTools_History)& theHistory)
0038   {
0039     myHistory = theHistory;
0040   }
0041 
0042   //! Returns the history.
0043   const Handle(BRepTools_History)& History() const
0044   {
0045     return myHistory;
0046   }
0047 
0048   //! Drawing is not available.
0049   Standard_EXPORT virtual void DrawOn(Draw_Display&)const Standard_OVERRIDE;
0050 
0051   //! Dumps the history.
0052   Standard_EXPORT virtual void Dump(Standard_OStream& theS) const Standard_OVERRIDE;
0053 
0054   //! Prints the type of the history object.
0055   Standard_EXPORT virtual void Whatis(Draw_Interpretor& theDI) const Standard_OVERRIDE;
0056 
0057 private:
0058 
0059   Handle(BRepTools_History) myHistory; //!< Tool for tracking History of shape's modification
0060 };
0061 
0062 DEFINE_STANDARD_HANDLE(BRepTest_DrawableHistory, Draw_Drawable3D)
0063 
0064 #endif