1 // Created on: 2002-12-10
2 // Created by: data exchange team
3 // Copyright (c) 2002-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0
18 #include <Standard_Transient.hxx>
19 #include <StepData_SelectMember.hxx>
20 #include <StepElement_ElementAspect.hxx>
21 #include <StepElement_ElementAspectMember.hxx>
22 #include <TCollection_HAsciiString.hxx>
24 //=======================================================================
25 //function : StepElement_ElementAspect
27 //=======================================================================
28 StepElement_ElementAspect::StepElement_ElementAspect ()
32 //=======================================================================
35 //=======================================================================
37 Standard_Integer StepElement_ElementAspect::CaseNum (const Handle(Standard_Transient)& /*ent*/) const
42 //=======================================================================
45 //=======================================================================
47 Standard_Integer StepElement_ElementAspect::CaseMem (const Handle(StepData_SelectMember)& ent) const
49 if(ent.IsNull()) return 0;
50 if(ent->Matches("ELEMENT_VOLUME")) return 1;
51 else if(ent->Matches("VOLUME_3D_FACE")) return 2;
52 else if(ent->Matches("VOLUME_2D_FACE")) return 3;
53 else if(ent->Matches("VOLUME_3D_EDGE")) return 4;
54 else if(ent->Matches("VOLUME_2D_EDGE")) return 5;
55 else if(ent->Matches("SURFACE_3D_FACE")) return 6;
56 else if(ent->Matches("SURFACE_2D_FACE")) return 7;
57 else if(ent->Matches("SURFACE_3D_EDGE")) return 8;
58 else if(ent->Matches("SURFACE_2D_EDGE")) return 9;
59 else if(ent->Matches("CURVE_EDGE")) return 10;
63 //=======================================================================
64 //function : NewMember
66 //=======================================================================
68 Handle(StepData_SelectMember) StepElement_ElementAspect::NewMember() const
70 return new StepElement_ElementAspectMember;
73 //=======================================================================
74 //function : SetElementVolume
76 //=======================================================================
78 void StepElement_ElementAspect::SetElementVolume (const StepElement_ElementVolume val)
80 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
81 if(SelMem.IsNull()) return;
82 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("ELEMENT_VOLUME");
83 SelMem->SetName(name->ToCString());
84 SelMem->SetEnum((Standard_Integer)val);
87 //=======================================================================
88 //function : ElementVolume
90 //=======================================================================
92 StepElement_ElementVolume StepElement_ElementAspect::ElementVolume () const
94 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
95 if(SelMem.IsNull()) return StepElement_Volume;
96 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
97 name->AssignCat(SelMem->Name());
98 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("ELEMENT_VOLUME");
99 if(name->IsDifferent(nameitem)) return StepElement_Volume;
100 Standard_Integer numit = SelMem->Enum();
101 StepElement_ElementVolume val;
103 case 1 : val = StepElement_Volume; break;
104 default : return StepElement_Volume;break;
109 //=======================================================================
110 //function : SetVolume3dFace
112 //=======================================================================
114 void StepElement_ElementAspect::SetVolume3dFace (const Standard_Integer val)
116 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
117 if(SelMem.IsNull()) return;
118 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_3D_FACE");
119 SelMem->SetName(name->ToCString());
120 SelMem->SetInteger(val);
123 //=======================================================================
124 //function : Volume3dFace
126 //=======================================================================
128 Standard_Integer StepElement_ElementAspect::Volume3dFace () const
130 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
131 if(SelMem.IsNull()) return 0;
132 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
133 name->AssignCat(SelMem->Name());
134 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_3D_FACE");
135 if(name->IsDifferent(nameitem)) return 0;
136 Standard_Integer val = SelMem->Integer();
140 //=======================================================================
141 //function : SetVolume2dFace
143 //=======================================================================
145 void StepElement_ElementAspect::SetVolume2dFace (const Standard_Integer val)
147 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
148 if(SelMem.IsNull()) return;
149 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_2D_FACE");
150 SelMem->SetName(name->ToCString());
151 SelMem->SetInteger(val);
154 //=======================================================================
155 //function : Volume2dFace
157 //=======================================================================
159 Standard_Integer StepElement_ElementAspect::Volume2dFace () const
161 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
162 if(SelMem.IsNull()) return 0;
163 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
164 name->AssignCat(SelMem->Name());
165 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_2D_FACE");
166 if(name->IsDifferent(nameitem)) return 0;
167 Standard_Integer val = SelMem->Integer();
171 //=======================================================================
172 //function : SetVolume3dEdge
174 //=======================================================================
176 void StepElement_ElementAspect::SetVolume3dEdge (const Standard_Integer val)
178 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
179 if(SelMem.IsNull()) return;
180 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_3D_EDGE");
181 SelMem->SetName(name->ToCString());
182 SelMem->SetInteger(val);
185 //=======================================================================
186 //function : Volume3dEdge
188 //=======================================================================
190 Standard_Integer StepElement_ElementAspect::Volume3dEdge () const
192 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
193 if(SelMem.IsNull()) return 0;
194 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
195 name->AssignCat(SelMem->Name());
196 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_3D_EDGE");
197 if(name->IsDifferent(nameitem)) return 0;
198 Standard_Integer val = SelMem->Integer();
202 //=======================================================================
203 //function : SetVolume2dEdge
205 //=======================================================================
207 void StepElement_ElementAspect::SetVolume2dEdge (const Standard_Integer val)
209 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
210 if(SelMem.IsNull()) return;
211 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_2D_EDGE");
212 SelMem->SetName(name->ToCString());
213 SelMem->SetInteger(val);
216 //=======================================================================
217 //function : Volume2dEdge
219 //=======================================================================
221 Standard_Integer StepElement_ElementAspect::Volume2dEdge () const
223 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
224 if(SelMem.IsNull()) return 0;
225 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
226 name->AssignCat(SelMem->Name());
227 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_2D_EDGE");
228 if(name->IsDifferent(nameitem)) return 0;
229 Standard_Integer val = SelMem->Integer();
233 //=======================================================================
234 //function : SetSurface3dFace
236 //=======================================================================
238 void StepElement_ElementAspect::SetSurface3dFace (const Standard_Integer val)
240 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
241 if(SelMem.IsNull()) return;
242 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_3D_FACE");
243 SelMem->SetName(name->ToCString());
244 SelMem->SetInteger(val);
247 //=======================================================================
248 //function : Surface3dFace
250 //=======================================================================
252 Standard_Integer StepElement_ElementAspect::Surface3dFace () const
254 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
255 if(SelMem.IsNull()) return 0;
256 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
257 name->AssignCat(SelMem->Name());
258 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_3D_FACE");
259 if(name->IsDifferent(nameitem)) return 0;
260 Standard_Integer val = SelMem->Integer();
264 //=======================================================================
265 //function : SetSurface2dFace
267 //=======================================================================
269 void StepElement_ElementAspect::SetSurface2dFace (const Standard_Integer val)
271 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
272 if(SelMem.IsNull()) return;
273 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_2D_FACE");
274 SelMem->SetName(name->ToCString());
275 SelMem->SetInteger(val);
278 //=======================================================================
279 //function : Surface2dFace
281 //=======================================================================
283 Standard_Integer StepElement_ElementAspect::Surface2dFace () const
285 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
286 if(SelMem.IsNull()) return 0;
287 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
288 name->AssignCat(SelMem->Name());
289 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_2D_FACE");
290 if(name->IsDifferent(nameitem)) return 0;
291 Standard_Integer val = SelMem->Integer();
295 //=======================================================================
296 //function : SetSurface3dEdge
298 //=======================================================================
300 void StepElement_ElementAspect::SetSurface3dEdge (const Standard_Integer val)
302 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
303 if(SelMem.IsNull()) return;
304 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_3D_EDGE");
305 SelMem->SetName(name->ToCString());
306 SelMem->SetInteger(val);
309 //=======================================================================
310 //function : Surface3dEdge
312 //=======================================================================
314 Standard_Integer StepElement_ElementAspect::Surface3dEdge () const
316 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
317 if(SelMem.IsNull()) return 0;
318 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
319 name->AssignCat(SelMem->Name());
320 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_3D_EDGE");
321 if(name->IsDifferent(nameitem)) return 0;
322 Standard_Integer val = SelMem->Integer();
326 //=======================================================================
327 //function : SetSurface2dEdge
329 //=======================================================================
331 void StepElement_ElementAspect::SetSurface2dEdge (const Standard_Integer val)
333 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
334 if(SelMem.IsNull()) return;
335 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_2D_EDGE");
336 SelMem->SetName(name->ToCString());
337 SelMem->SetInteger(val);
340 //=======================================================================
341 //function : Surface2dEdge
343 //=======================================================================
345 Standard_Integer StepElement_ElementAspect::Surface2dEdge () const
347 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
348 if(SelMem.IsNull()) return 0;
349 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
350 name->AssignCat(SelMem->Name());
351 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_2D_EDGE");
352 if(name->IsDifferent(nameitem)) return 0;
353 Standard_Integer val = SelMem->Integer();
357 //=======================================================================
358 //function : SetCurveEdge
360 //=======================================================================
362 void StepElement_ElementAspect::SetCurveEdge (const StepElement_CurveEdge val)
364 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
365 if(SelMem.IsNull()) return;
366 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("CURVE_EDGE");
367 SelMem->SetName(name->ToCString());
368 SelMem->SetEnum((Standard_Integer)val);
371 //=======================================================================
372 //function : CurveEdge
374 //=======================================================================
376 StepElement_CurveEdge StepElement_ElementAspect::CurveEdge () const
378 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
379 if(SelMem.IsNull()) return StepElement_ElementEdge;
380 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
381 name->AssignCat(SelMem->Name());
382 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("CURVE_EDGE");
383 if(name->IsDifferent(nameitem)) return StepElement_ElementEdge;
384 Standard_Integer numit = SelMem->Enum();
385 StepElement_CurveEdge val;
387 case 1 : val = StepElement_ElementEdge; break;
388 default : return StepElement_ElementEdge;break;