0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override]
[occt.git] / src / TDataXtd / TDataXtd_Geometry.hxx
1 // Created on: 2009-04-06
2 // Created by: Sergey ZARITCHNY
3 // Copyright (c) 2009-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _TDataXtd_Geometry_HeaderFile
17 #define _TDataXtd_Geometry_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21
22 #include <TDataXtd_GeometryEnum.hxx>
23 #include <TDF_Attribute.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_OStream.hxx>
26 class TDF_Label;
27 class TNaming_NamedShape;
28 class gp_Pnt;
29 class gp_Ax1;
30 class gp_Lin;
31 class gp_Circ;
32 class gp_Elips;
33 class gp_Pln;
34 class gp_Cylinder;
35 class Standard_GUID;
36 class TDF_Attribute;
37 class TDF_RelocationTable;
38
39
40 class TDataXtd_Geometry;
41 DEFINE_STANDARD_HANDLE(TDataXtd_Geometry, TDF_Attribute)
42
43 //! This class is used to model construction geometry.
44 //! The specific geometric construction of the
45 //! attribute is defined by an element of the
46 //! enumeration TDataXtd_GeometryEnum.
47 //! This attribute may  also be used to qualify  underlying
48 //! geometry  of   the  associated NamedShape.     for
49 //! Constructuion element by example.
50 class TDataXtd_Geometry : public TDF_Attribute
51 {
52
53 public:
54
55   
56   //! API class methods
57   //! =================
58   //! Finds, or  creates, a Geometry attribute  defined by the label label.
59   //! The default type of geometry is the value
60   //! ANY_GEOM of the enumeration TDataXtd_GeometryEnum.
61   //! To specify another value of this enumeration, use
62   //! the function SetType.
63   Standard_EXPORT static Handle(TDataXtd_Geometry) Set (const TDF_Label& label);
64   
65
66   //! Returns the label L used to define the type of
67   //! geometric construction for the geometry attribute.
68   Standard_EXPORT static TDataXtd_GeometryEnum Type (const TDF_Label& L);
69   
70   //! Returns the topological attribute S used to define
71   //! the type of geometric construction for the geometry attribute.
72   Standard_EXPORT static TDataXtd_GeometryEnum Type (const Handle(TNaming_NamedShape)& S);
73   
74
75   //! Returns the point attribute defined by the label L and the point G.
76   Standard_EXPORT static Standard_Boolean Point (const TDF_Label& L, gp_Pnt& G);
77   
78
79   //! Returns the point attribute defined by the topological attribute S and the point G.
80   Standard_EXPORT static Standard_Boolean Point (const Handle(TNaming_NamedShape)& S, gp_Pnt& G);
81   
82
83   //! Returns the axis attribute defined by the label L and the axis G.
84   Standard_EXPORT static Standard_Boolean Axis (const TDF_Label& L, gp_Ax1& G);
85   
86
87   //! Returns the axis attribute defined by the topological attribute S and the axis G.
88   Standard_EXPORT static Standard_Boolean Axis (const Handle(TNaming_NamedShape)& S, gp_Ax1& G);
89   
90
91   //! Returns the line attribute defined by the label L and the line G.
92   Standard_EXPORT static Standard_Boolean Line (const TDF_Label& L, gp_Lin& G);
93   
94
95   //! Returns the line attribute defined by the topological attribute S and the line G.
96   Standard_EXPORT static Standard_Boolean Line (const Handle(TNaming_NamedShape)& S, gp_Lin& G);
97   
98
99   //! Returns the circle attribute defined by the label L and the circle G.
100   Standard_EXPORT static Standard_Boolean Circle (const TDF_Label& L, gp_Circ& G);
101   
102
103   //! Returns the circle attribute defined by the topological attribute S and the circle G.
104   Standard_EXPORT static Standard_Boolean Circle (const Handle(TNaming_NamedShape)& S, gp_Circ& G);
105   
106
107   //! Returns the ellipse attribute defined by the label L and the ellipse G.
108   Standard_EXPORT static Standard_Boolean Ellipse (const TDF_Label& L, gp_Elips& G);
109   
110
111   //! Returns the ellipse attribute defined by the
112   //! topological attribute S and the ellipse G.
113   Standard_EXPORT static Standard_Boolean Ellipse (const Handle(TNaming_NamedShape)& S, gp_Elips& G);
114   
115
116   //! Returns the plane attribute defined by the label L and the plane G.
117   Standard_EXPORT static Standard_Boolean Plane (const TDF_Label& L, gp_Pln& G);
118   
119
120   //! Returns the plane attribute defined by the
121   //! topological attribute S and the plane G.
122   Standard_EXPORT static Standard_Boolean Plane (const Handle(TNaming_NamedShape)& S, gp_Pln& G);
123   
124
125   //! Returns the cylinder attribute defined by the label L and the cylinder G.
126   Standard_EXPORT static Standard_Boolean Cylinder (const TDF_Label& L, gp_Cylinder& G);
127   
128
129   //! Returns the cylinder attribute defined by the
130   //! topological attribute S and the cylinder G.
131   Standard_EXPORT static Standard_Boolean Cylinder (const Handle(TNaming_NamedShape)& S, gp_Cylinder& G);
132   
133   //! Returns the GUID for geometry attributes.
134   Standard_EXPORT static const Standard_GUID& GetID();
135   
136   //! This and the next methods are used to  retrieve  underlying geometry of  the
137   //! NamedShape, even   if  noone Geometry   Attribute  is
138   //! associated  .  if not  found or not compliant geometry return False.
139   Standard_EXPORT TDataXtd_Geometry();
140   
141   //! Returns the type of geometric construction T of this attribute.
142   //! T will be a value of the enumeration TDataXtd_GeometryEnum.
143   Standard_EXPORT void SetType (const TDataXtd_GeometryEnum T);
144   
145   //! Returns the type of geometric construction.
146   Standard_EXPORT TDataXtd_GeometryEnum GetType() const;
147   
148   Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
149   
150   Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
151   
152   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
153   
154   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
155   
156   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
157
158
159
160
161   DEFINE_STANDARD_RTTI(TDataXtd_Geometry,TDF_Attribute)
162
163 protected:
164
165
166
167
168 private:
169
170
171   TDataXtd_GeometryEnum myType;
172
173
174 };
175
176
177
178
179
180
181
182 #endif // _TDataXtd_Geometry_HeaderFile