b311480e |
1 | // Created on: 2002-12-15 |
2 | // Created by: data exchange team |
973c2be1 |
3 | // Copyright (c) 2002-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
7fd59977 |
16 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 |
7fd59977 |
17 | |
18 | #include <RWStepFEA_RWFeaModelDefinition.ixx> |
ec357c5c |
19 | #include <StepRepr_ProductDefinitionShape.hxx> |
7fd59977 |
20 | |
21 | //======================================================================= |
22 | //function : RWStepFEA_RWFeaModelDefinition |
23 | //purpose : |
24 | //======================================================================= |
25 | |
26 | RWStepFEA_RWFeaModelDefinition::RWStepFEA_RWFeaModelDefinition () |
27 | { |
28 | } |
29 | |
30 | //======================================================================= |
31 | //function : ReadStep |
32 | //purpose : |
33 | //======================================================================= |
34 | |
35 | void RWStepFEA_RWFeaModelDefinition::ReadStep (const Handle(StepData_StepReaderData)& data, |
36 | const Standard_Integer num, |
37 | Handle(Interface_Check)& ach, |
38 | const Handle(StepFEA_FeaModelDefinition) &ent) const |
39 | { |
40 | // Check number of parameters |
41 | if ( ! data->CheckNbParams(num,4,ach,"fea_model_definition") ) return; |
42 | |
43 | // Inherited fields of ShapeAspect |
44 | |
45 | Handle(TCollection_HAsciiString) aShapeAspect_Name; |
46 | data->ReadString (num, 1, "shape_aspect.name", ach, aShapeAspect_Name); |
47 | |
48 | Handle(TCollection_HAsciiString) aShapeAspect_Description; |
49 | data->ReadString (num, 2, "shape_aspect.description", ach, aShapeAspect_Description); |
50 | |
51 | Handle(StepRepr_ProductDefinitionShape) aShapeAspect_OfShape; |
52 | data->ReadEntity (num, 3, "shape_aspect.of_shape", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aShapeAspect_OfShape); |
53 | |
54 | StepData_Logical aShapeAspect_ProductDefinitional; |
55 | data->ReadLogical (num, 4, "shape_aspect.product_definitional", ach, aShapeAspect_ProductDefinitional); |
56 | |
57 | // Initialize entity |
58 | ent->Init(aShapeAspect_Name, |
59 | aShapeAspect_Description, |
60 | aShapeAspect_OfShape, |
61 | aShapeAspect_ProductDefinitional); |
62 | } |
63 | |
64 | //======================================================================= |
65 | //function : WriteStep |
66 | //purpose : |
67 | //======================================================================= |
68 | |
69 | void RWStepFEA_RWFeaModelDefinition::WriteStep (StepData_StepWriter& SW, |
70 | const Handle(StepFEA_FeaModelDefinition) &ent) const |
71 | { |
72 | |
73 | // Inherited fields of ShapeAspect |
74 | |
75 | SW.Send (ent->StepRepr_ShapeAspect::Name()); |
76 | |
77 | SW.Send (ent->StepRepr_ShapeAspect::Description()); |
78 | |
79 | SW.Send (ent->StepRepr_ShapeAspect::OfShape()); |
80 | |
81 | SW.SendLogical (ent->StepRepr_ShapeAspect::ProductDefinitional()); |
82 | } |
83 | |
84 | //======================================================================= |
85 | //function : Share |
86 | //purpose : |
87 | //======================================================================= |
88 | |
89 | void RWStepFEA_RWFeaModelDefinition::Share (const Handle(StepFEA_FeaModelDefinition) &ent, |
90 | Interface_EntityIterator& iter) const |
91 | { |
92 | |
93 | // Inherited fields of ShapeAspect |
94 | |
95 | iter.AddItem (ent->StepRepr_ShapeAspect::OfShape()); |
96 | } |