1 // Created on: 1993-04-22
2 // Created by: Christian CAILLET
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Interface_HGraph_HeaderFile
18 #define _Interface_HGraph_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Interface_Graph.hxx>
24 #include <Standard_Transient.hxx>
25 #include <Standard_Boolean.hxx>
26 class Standard_DomainError;
27 class Interface_Graph;
28 class Interface_InterfaceModel;
29 class Interface_GeneralLib;
30 class Interface_Protocol;
31 class Interface_GTool;
34 class Interface_HGraph;
35 DEFINE_STANDARD_HANDLE(Interface_HGraph, Standard_Transient)
37 //! This class allows to store a redefinable Graph, via a Handle
38 //! (usefull for an Object which can work on several successive
39 //! Models, with the same general conditions)
40 class Interface_HGraph : public Standard_Transient
46 //! Creates an HGraph directly from a Graph.
47 //! Remark that the starting Graph is duplicated
48 Standard_EXPORT Interface_HGraph(const Interface_Graph& agraph);
50 //! Creates an HGraph with a Graph created from <amodel> and <lib>
51 Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib, const Standard_Boolean theModeStats = Standard_True);
53 //! Creates an HGraph with a graph itself created from <amodel>
55 Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True);
57 //! Creates an HGraph with a graph itself created from <amodel>
59 Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True);
61 //! Same a above, but works with the GTool in the model
62 Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Standard_Boolean theModeStats = Standard_True);
64 //! Returns the Graph contained in <me>, for Read Only Operations
65 //! Remark that it is returns as "const &"
66 //! Getting it in a new variable instead of a reference would be
67 //! a pitty, because all the graph's content would be duplicated
68 Standard_EXPORT const Interface_Graph& Graph() const;
70 //! Same as above, but for Read-Write Operations
71 //! Then, The Graph will be modified in the HGraph itself
72 Standard_EXPORT Interface_Graph& CGraph();
77 DEFINE_STANDARD_RTTIEXT(Interface_HGraph,Standard_Transient)
87 Interface_Graph thegraph;
98 #endif // _Interface_HGraph_HeaderFile