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
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 _TopoDS_HeaderFile
18 #define _TopoDS_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
31 class TopoDS_CompSolid;
32 class TopoDS_Compound;
48 class TopoDS_TCompSolid;
49 class TopoDS_CompSolid;
50 class TopoDS_TCompound;
51 class TopoDS_Compound;
53 class TopoDS_Iterator;
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.
68 //! Basic tool to access the data structure.
69 //! Casts shape S to the more specialized return type, Vertex.
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&);
75 //! Casts shape S to the more specialized return type, Edge
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&);
81 //! Casts shape S to the more specialized return type, Wire.
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&);
87 //! Casts shape S to the more specialized return type, Face.
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&);
93 //! Casts shape S to the more specialized return type, Shell.
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&);
99 //! Casts shape S to the more specialized return type, Solid.
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&);
105 //! Casts shape S to the more specialized return type, CompSolid.
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&);
111 //! Casts shape S to the more specialized return type, Compound.
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&);
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;
156 #include <TopoDS.lxx>
162 #endif // _TopoDS_HeaderFile