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>
30 class TopoDS_CompSolid;
31 class TopoDS_Compound;
47 class TopoDS_TCompSolid;
48 class TopoDS_CompSolid;
49 class TopoDS_TCompound;
50 class TopoDS_Compound;
52 class TopoDS_Iterator;
55 //! Provides methods to cast objects of class
56 //! TopoDS_Shape to be objects of more specialized
57 //! sub-classes. Types are verified, thus in the example
58 //! below, the first two blocks are correct but the third is
59 //! rejected by the compiler.
67 //! Basic tool to access the data structure.
68 //! Casts shape S to the more specialized return type, Vertex.
70 //! Standard_TypeMismatch if S cannot be cast to this return type.
71 static const TopoDS_Vertex& Vertex (const TopoDS_Shape& S);
72 inline static TopoDS_Vertex& Vertex(TopoDS_Shape&);
74 //! Casts shape S to the more specialized return type, Edge
76 //! Standard_TypeMismatch if S cannot be cast to this return type.
77 static const TopoDS_Edge& Edge (const TopoDS_Shape& S);
78 inline static TopoDS_Edge& Edge(TopoDS_Shape&);
80 //! Casts shape S to the more specialized return type, Wire.
82 //! Standard_TypeMismatch if S cannot be cast to this return type.
83 static const TopoDS_Wire& Wire (const TopoDS_Shape& S);
84 inline static TopoDS_Wire& Wire(TopoDS_Shape&);
86 //! Casts shape S to the more specialized return type, Face.
88 //! Standard_TypeMismatch if S cannot be cast to this return type.
89 static const TopoDS_Face& Face (const TopoDS_Shape& S);
90 inline static TopoDS_Face& Face(TopoDS_Shape&);
92 //! Casts shape S to the more specialized return type, Shell.
94 //! Standard_TypeMismatch if S cannot be cast to this return type.
95 static const TopoDS_Shell& Shell (const TopoDS_Shape& S);
96 inline static TopoDS_Shell& Shell(TopoDS_Shape&);
98 //! Casts shape S to the more specialized return type, Solid.
100 //! Standard_TypeMismatch if S cannot be cast to this return type.
101 static const TopoDS_Solid& Solid (const TopoDS_Shape& S);
102 inline static TopoDS_Solid& Solid(TopoDS_Shape&);
104 //! Casts shape S to the more specialized return type, CompSolid.
106 //! Standard_TypeMismatch if S cannot be cast to this return type.
107 static const TopoDS_CompSolid& CompSolid (const TopoDS_Shape& S);
108 inline static TopoDS_CompSolid& CompSolid(TopoDS_Shape&);
110 //! Casts shape S to the more specialized return type, Compound.
112 //! Standard_TypeMismatch if S cannot be cast to this return type.
113 static const TopoDS_Compound& Compound (const TopoDS_Shape& S);
114 inline static TopoDS_Compound& Compound(TopoDS_Shape&);
118 #include <TopoDS.lxx>
120 #endif // _TopoDS_HeaderFile