42cf5bc1 |
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 |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Interface_HGraph_HeaderFile |
18 | #define _Interface_HGraph_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Interface_Graph.hxx> |
25e59720 |
24 | #include <Standard_Transient.hxx> |
42cf5bc1 |
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; |
32 | |
33 | |
34 | class Interface_HGraph; |
25e59720 |
35 | DEFINE_STANDARD_HANDLE(Interface_HGraph, Standard_Transient) |
42cf5bc1 |
36 | |
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) |
25e59720 |
40 | class Interface_HGraph : public Standard_Transient |
42cf5bc1 |
41 | { |
42 | |
43 | public: |
44 | |
45 | |
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); |
49 | |
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); |
52 | |
53 | //! Creates an HGraph with a graph itself created from <amodel> |
54 | //! and <protocol> |
55 | Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True); |
56 | |
57 | //! Creates an HGraph with a graph itself created from <amodel> |
58 | //! and <protocol> |
59 | Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True); |
60 | |
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); |
63 | |
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; |
69 | |
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(); |
73 | |
74 | |
75 | |
76 | |
25e59720 |
77 | DEFINE_STANDARD_RTTIEXT(Interface_HGraph,Standard_Transient) |
42cf5bc1 |
78 | |
79 | protected: |
80 | |
81 | |
82 | |
83 | |
84 | private: |
85 | |
86 | |
87 | Interface_Graph thegraph; |
88 | |
89 | |
90 | }; |
91 | |
92 | |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | #endif // _Interface_HGraph_HeaderFile |