42cf5bc1 |
1 | // Created on: 1993-04-30 |
2 | // Created by: Yves FRICAUD |
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 _MAT_Node_HeaderFile |
18 | #define _MAT_Node_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Integer.hxx> |
24 | #include <Standard_Address.hxx> |
25 | #include <Standard_Real.hxx> |
25e59720 |
26 | #include <Standard_Transient.hxx> |
42cf5bc1 |
27 | #include <MAT_SequenceOfArc.hxx> |
28 | #include <MAT_SequenceOfBasicElt.hxx> |
29 | #include <Standard_Boolean.hxx> |
30 | class MAT_Arc; |
31 | |
32 | |
33 | class MAT_Node; |
25e59720 |
34 | DEFINE_STANDARD_HANDLE(MAT_Node, Standard_Transient) |
42cf5bc1 |
35 | |
36 | //! Node of Graph. |
25e59720 |
37 | class MAT_Node : public Standard_Transient |
42cf5bc1 |
38 | { |
39 | |
40 | public: |
41 | |
42 | |
43 | Standard_EXPORT MAT_Node(const Standard_Integer GeomIndex, const Handle(MAT_Arc)& LinkedArc, const Standard_Real Distance); |
44 | |
45 | //! Returns the index associated of the geometric |
46 | //! representation of <me>. |
47 | Standard_EXPORT Standard_Integer GeomIndex() const; |
48 | |
49 | //! Returns the index associated of the node |
50 | Standard_EXPORT Standard_Integer Index() const; |
51 | |
52 | //! Returns in <S> the Arcs linked to <me>. |
53 | Standard_EXPORT void LinkedArcs (MAT_SequenceOfArc& S) const; |
54 | |
55 | //! Returns in <S> the BasicElts equidistant |
56 | //! to <me>. |
57 | Standard_EXPORT void NearElts (MAT_SequenceOfBasicElt& S) const; |
58 | |
59 | Standard_EXPORT Standard_Real Distance() const; |
60 | |
61 | //! Returns True if <me> is a pending Node. |
62 | //! (ie : the number of Arc Linked = 1) |
63 | Standard_EXPORT Standard_Boolean PendingNode() const; |
64 | |
65 | //! Returns True if <me> belongs to the figure. |
66 | Standard_EXPORT Standard_Boolean OnBasicElt() const; |
67 | |
68 | //! Returns True if the distance of <me> is Infinite |
69 | Standard_EXPORT Standard_Boolean Infinite() const; |
70 | |
71 | //! Set the index associated of the node |
72 | Standard_EXPORT void SetIndex (const Standard_Integer anIndex); |
73 | |
74 | Standard_EXPORT void SetLinkedArc (const Handle(MAT_Arc)& anArc); |
75 | |
76 | |
77 | |
78 | |
25e59720 |
79 | DEFINE_STANDARD_RTTIEXT(MAT_Node,Standard_Transient) |
42cf5bc1 |
80 | |
81 | protected: |
82 | |
83 | |
84 | |
85 | |
86 | private: |
87 | |
88 | |
89 | Standard_Integer nodeIndex; |
90 | Standard_Integer geomIndex; |
91 | Standard_Address aLinkedArc; |
92 | Standard_Real distance; |
93 | |
94 | |
95 | }; |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | #endif // _MAT_Node_HeaderFile |