0031318: Documentation, TopoDS.hxx - typo in the reference manual
[occt.git] / src / TopoDS / TopoDS.hxx
1 // Created on: 1990-12-11
2 // Created by: Remi Lequette
3 // Copyright (c) 1990-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 _TopoDS_HeaderFile
18 #define _TopoDS_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 class TopoDS_Vertex;
25 class TopoDS_Shape;
26 class TopoDS_Edge;
27 class TopoDS_Wire;
28 class TopoDS_Face;
29 class TopoDS_Shell;
30 class TopoDS_Solid;
31 class TopoDS_CompSolid;
32 class TopoDS_Compound;
33 class TopoDS_Shape;
34 class TopoDS_HShape;
35 class TopoDS_TShape;
36 class TopoDS_TVertex;
37 class TopoDS_Vertex;
38 class TopoDS_TEdge;
39 class TopoDS_Edge;
40 class TopoDS_TWire;
41 class TopoDS_Wire;
42 class TopoDS_TFace;
43 class TopoDS_Face;
44 class TopoDS_TShell;
45 class TopoDS_Shell;
46 class TopoDS_TSolid;
47 class TopoDS_Solid;
48 class TopoDS_TCompSolid;
49 class TopoDS_CompSolid;
50 class TopoDS_TCompound;
51 class TopoDS_Compound;
52 class TopoDS_Builder;
53 class TopoDS_Iterator;
54
55
56 //! Provides methods to cast objects of class
57 //! TopoDS_Shape to be objects of more specialized
58 //! sub-classes. Types are verified, thus in the example
59 //! below, the first two blocks are correct but the third is
60 //! rejected by the compiler.
61 class TopoDS 
62 {
63 public:
64
65   DEFINE_STANDARD_ALLOC
66
67   
68   //! Basic tool to access the data structure.
69   //! Casts shape S to the more specialized return type, Vertex.
70   //! Exceptions
71   //! Standard_TypeMismatch if S cannot be cast to this return type.
72     static const TopoDS_Vertex& Vertex (const TopoDS_Shape& S);
73 inline static TopoDS_Vertex& Vertex(TopoDS_Shape&);
74   
75   //! Casts shape S to the more specialized return type, Edge
76   //! Exceptions
77   //! Standard_TypeMismatch if S cannot be cast to this return type.
78     static const TopoDS_Edge& Edge (const TopoDS_Shape& S);
79 inline static TopoDS_Edge& Edge(TopoDS_Shape&);
80   
81   //! Casts shape S to the more specialized return type, Wire.
82   //! Exceptions
83   //! Standard_TypeMismatch if S cannot be cast to this return type.
84     static const TopoDS_Wire& Wire (const TopoDS_Shape& S);
85 inline static TopoDS_Wire& Wire(TopoDS_Shape&);
86   
87   //! Casts shape S to the more specialized return type, Face.
88   //! Exceptions
89   //! Standard_TypeMismatch if S cannot be cast to this return type.
90     static const TopoDS_Face& Face (const TopoDS_Shape& S);
91 inline static TopoDS_Face& Face(TopoDS_Shape&);
92   
93   //! Casts shape S to the more specialized return type, Shell.
94   //! Exceptions
95   //! Standard_TypeMismatch if S cannot be cast to this return type.
96     static const TopoDS_Shell& Shell (const TopoDS_Shape& S);
97 inline static TopoDS_Shell& Shell(TopoDS_Shape&);
98   
99   //! Casts shape S to the more specialized return type, Solid.
100   //! Exceptions
101   //! Standard_TypeMismatch if S cannot be cast to this return type.
102     static const TopoDS_Solid& Solid (const TopoDS_Shape& S);
103 inline static TopoDS_Solid& Solid(TopoDS_Shape&);
104   
105   //! Casts shape S to the more specialized return type, CompSolid.
106   //! Exceptions
107   //! Standard_TypeMismatch if S cannot be cast to this return type.
108     static const TopoDS_CompSolid& CompSolid (const TopoDS_Shape& S);
109 inline static TopoDS_CompSolid& CompSolid(TopoDS_Shape&);
110   
111   //! Casts shape S to the more specialized return type, Compound.
112   //! Exceptions
113   //! Standard_TypeMismatch if S cannot be cast to this return type.
114     static const TopoDS_Compound& Compound (const TopoDS_Shape& S);
115 inline static TopoDS_Compound& Compound(TopoDS_Shape&);
116
117
118
119
120 protected:
121
122
123
124
125
126 private:
127
128
129
130
131 friend class TopoDS_Shape;
132 friend class TopoDS_HShape;
133 friend class TopoDS_TShape;
134 friend class TopoDS_TVertex;
135 friend class TopoDS_Vertex;
136 friend class TopoDS_TEdge;
137 friend class TopoDS_Edge;
138 friend class TopoDS_TWire;
139 friend class TopoDS_Wire;
140 friend class TopoDS_TFace;
141 friend class TopoDS_Face;
142 friend class TopoDS_TShell;
143 friend class TopoDS_Shell;
144 friend class TopoDS_TSolid;
145 friend class TopoDS_Solid;
146 friend class TopoDS_TCompSolid;
147 friend class TopoDS_CompSolid;
148 friend class TopoDS_TCompound;
149 friend class TopoDS_Compound;
150 friend class TopoDS_Builder;
151 friend class TopoDS_Iterator;
152
153 };
154
155
156 #include <TopoDS.lxx>
157
158
159
160
161
162 #endif // _TopoDS_HeaderFile