0032667: Coding - get rid of unused forward declarations [LibCtl to StepRepr]
[occt.git] / src / MAT / MAT_Arc.hxx
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_Arc_HeaderFile
18 #define _MAT_Arc_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_Transient.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <MAT_Side.hxx>
28 class MAT_BasicElt;
29 class MAT_Node;
30
31
32 class MAT_Arc;
33 DEFINE_STANDARD_HANDLE(MAT_Arc, Standard_Transient)
34
35 //! An Arc is associated to each Bisecting of the mat.
36 class MAT_Arc : public Standard_Transient
37 {
38
39 public:
40
41   
42   Standard_EXPORT MAT_Arc(const Standard_Integer ArcIndex, const Standard_Integer GeomIndex, const Handle(MAT_BasicElt)& FirstElement, const Handle(MAT_BasicElt)& SecondElement);
43   
44   //! Returns the index of <me> in Graph.theArcs.
45   Standard_EXPORT Standard_Integer Index() const;
46   
47   //! Returns  the index associated  of the  geometric
48   //! representation of <me>.
49   Standard_EXPORT Standard_Integer GeomIndex() const;
50   
51   //! Returns one of the BasicElt equidistant from <me>.
52   Standard_EXPORT Handle(MAT_BasicElt) FirstElement() const;
53   
54   //! Returns the other BasicElt equidistant from <me>.
55   Standard_EXPORT Handle(MAT_BasicElt) SecondElement() const;
56   
57   //! Returns one Node extremity of <me>.
58   Standard_EXPORT Handle(MAT_Node) FirstNode() const;
59   
60   //! Returns the other Node extremity of <me>.
61   Standard_EXPORT Handle(MAT_Node) SecondNode() const;
62   
63   //! an Arc has two Node, if <aNode> egal one
64   //! Returns the other.
65   //!
66   //! if <aNode> is not oh <me>
67   Standard_EXPORT Handle(MAT_Node) TheOtherNode (const Handle(MAT_Node)& aNode) const;
68   
69   //! Returnst True is there is an arc linked to
70   //! the Node <aNode> located on the side <aSide> of <me>;
71   //! if <aNode> is not on <me>
72   Standard_EXPORT Standard_Boolean HasNeighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const;
73   
74   //! Returns the first arc linked to the Node <aNode>
75   //! located on the side <aSide> of <me>;
76   //! if HasNeighbour() returns FALSE.
77   Standard_EXPORT Handle(MAT_Arc) Neighbour (const Handle(MAT_Node)& aNode, const MAT_Side aSide) const;
78   
79   Standard_EXPORT void SetIndex (const Standard_Integer anInteger);
80   
81   Standard_EXPORT void SetGeomIndex (const Standard_Integer anInteger);
82   
83   Standard_EXPORT void SetFirstElement (const Handle(MAT_BasicElt)& aBasicElt);
84   
85   Standard_EXPORT void SetSecondElement (const Handle(MAT_BasicElt)& aBasicElt);
86   
87   Standard_EXPORT void SetFirstNode (const Handle(MAT_Node)& aNode);
88   
89   Standard_EXPORT void SetSecondNode (const Handle(MAT_Node)& aNode);
90   
91   Standard_EXPORT void SetFirstArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc);
92   
93   Standard_EXPORT void SetSecondArc (const MAT_Side aSide, const Handle(MAT_Arc)& anArc);
94   
95   Standard_EXPORT void SetNeighbour (const MAT_Side aSide, const Handle(MAT_Node)& aNode, const Handle(MAT_Arc)& anArc);
96
97
98
99
100   DEFINE_STANDARD_RTTIEXT(MAT_Arc,Standard_Transient)
101
102 protected:
103
104
105
106
107 private:
108
109
110   Standard_Integer arcIndex;
111   Standard_Integer geomIndex;
112   Handle(MAT_BasicElt) firstElement;
113   Handle(MAT_BasicElt) secondElement;
114   Handle(MAT_Node) firstNode;
115   Handle(MAT_Node) secondNode;
116   Standard_Address firstArcLeft;
117   Standard_Address firstArcRight;
118   Standard_Address secondArcRight;
119   Standard_Address secondArcLeft;
120
121
122 };
123
124
125
126
127
128
129
130 #endif // _MAT_Arc_HeaderFile