Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2000-03-01
0002 // Created by: Denis PASCAL
0003 // Copyright (c) 2000-2014 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 _DDocStd_HeaderFile
0017 #define _DDocStd_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <Standard_Boolean.hxx>
0024 #include <Draw_Interpretor.hxx>
0025 class TDocStd_Application;
0026 class TDocStd_Document;
0027 class TDF_Label;
0028 class Standard_GUID;
0029 class TDF_Attribute;
0030 
0031 
0032 //! This package   provides Draw services to test  CAF
0033 //! standard documents (see TDocStd package)
0034 //!
0035 //! It provides :
0036 //!
0037 //! * Modification registration and Update management.
0038 //!
0039 //! * External references mechanism
0040 //!
0041 //! * UNDO/REDO
0042 //!
0043 //! * Document Creation, Save and Restore
0044 class DDocStd 
0045 {
0046 public:
0047 
0048   DEFINE_STANDARD_ALLOC
0049 
0050   
0051   //! Returns the global instance of application.
0052   Standard_EXPORT static const Handle(TDocStd_Application)& GetApplication ();
0053   
0054   Standard_EXPORT static Standard_Boolean GetDocument (Standard_CString& Name, Handle(TDocStd_Document)& Doc, const Standard_Boolean Complain = Standard_True);
0055   
0056   Standard_EXPORT static Standard_Boolean Find (const Handle(TDocStd_Document)& Document, const Standard_CString Entry, TDF_Label& Label, const Standard_Boolean Complain = Standard_True);
0057   
0058   Standard_EXPORT static Standard_Boolean Find (const Handle(TDocStd_Document)& Document, const Standard_CString Entry, const Standard_GUID& ID, Handle(TDF_Attribute)& A, const Standard_Boolean Complain = Standard_True);
0059   
0060   //! Safe variant for arbitrary type of argument
0061   template <class T> 
0062   static Standard_Boolean Find (const Handle(TDocStd_Document)& Document, const Standard_CString Entry, const Standard_GUID& ID, Handle(T)& A, const Standard_Boolean Complain = Standard_True)
0063   {
0064     Handle(TDF_Attribute) anAttr = A;
0065     return Find (Document, Entry, ID, anAttr, Complain) && ! (A = Handle(T)::DownCast(anAttr)).IsNull();
0066   }
0067 
0068   Standard_EXPORT static Draw_Interpretor& ReturnLabel (Draw_Interpretor& theCommands, const TDF_Label& L);
0069   
0070   Standard_EXPORT static void AllCommands (Draw_Interpretor& theCommands);
0071   
0072   //! NewDocument, Open, SaveAs, Save
0073   Standard_EXPORT static void ApplicationCommands (Draw_Interpretor& theCommands);
0074   
0075   //! Undo, Redo, SetModified, Propagate
0076   Standard_EXPORT static void DocumentCommands (Draw_Interpretor& theCommands);
0077   
0078   //! Modified, Update
0079   Standard_EXPORT static void ToolsCommands (Draw_Interpretor& theCommands);
0080   
0081   //! Create, Add, Remove, Open, Commit, Undo, Redo, SetNestedMode
0082   Standard_EXPORT static void MTMCommands (Draw_Interpretor& theCommands);
0083 
0084   //! ShapeSchema_Read
0085   Standard_EXPORT static void ShapeSchemaCommands(Draw_Interpretor& theCommands);
0086 
0087 };
0088 
0089 #endif // _DDocStd_HeaderFile