b311480e |
1 | // Created on: 2002-12-12 |
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 | |
42cf5bc1 |
18 | #include <Interface_Check.hxx> |
19 | #include <Interface_EntityIterator.hxx> |
20 | #include <RWStepFEA_RWFeaMaterialPropertyRepresentation.hxx> |
21 | #include <StepData_StepReaderData.hxx> |
22 | #include <StepData_StepWriter.hxx> |
23 | #include <StepFEA_FeaMaterialPropertyRepresentation.hxx> |
24 | #include <StepRepr_DataEnvironment.hxx> |
ec357c5c |
25 | #include <StepRepr_PropertyDefinition.hxx> |
26 | #include <StepRepr_Representation.hxx> |
7fd59977 |
27 | |
28 | //======================================================================= |
29 | //function : RWStepFEA_RWFeaMaterialPropertyRepresentation |
30 | //purpose : |
31 | //======================================================================= |
7fd59977 |
32 | RWStepFEA_RWFeaMaterialPropertyRepresentation::RWStepFEA_RWFeaMaterialPropertyRepresentation () |
33 | { |
34 | } |
35 | |
36 | //======================================================================= |
37 | //function : ReadStep |
38 | //purpose : |
39 | //======================================================================= |
40 | |
41 | void RWStepFEA_RWFeaMaterialPropertyRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data, |
42 | const Standard_Integer num, |
43 | Handle(Interface_Check)& ach, |
44 | const Handle(StepFEA_FeaMaterialPropertyRepresentation) &ent) const |
45 | { |
46 | // Check number of parameters |
47 | if ( ! data->CheckNbParams(num,3,ach,"fea_material_property_representation") ) return; |
48 | |
49 | // Inherited fields of PropertyDefinitionRepresentation |
50 | |
51 | Handle(StepRepr_PropertyDefinition) aPropertyDefinitionRepresentation_Definition; |
52 | data->ReadEntity (num, 1, "property_definition_representation.definition", ach, STANDARD_TYPE(StepRepr_PropertyDefinition), aPropertyDefinitionRepresentation_Definition); |
53 | StepRepr_RepresentedDefinition aDefinition; |
54 | aDefinition.SetValue(aPropertyDefinitionRepresentation_Definition); |
55 | |
56 | Handle(StepRepr_Representation) aPropertyDefinitionRepresentation_UsedRepresentation; |
57 | data->ReadEntity (num, 2, "property_definition_representation.used_representation", ach, STANDARD_TYPE(StepRepr_Representation), aPropertyDefinitionRepresentation_UsedRepresentation); |
58 | |
59 | // Inherited fields of MaterialPropertyRepresentation |
60 | |
61 | Handle(StepRepr_DataEnvironment) aMaterialPropertyRepresentation_DependentEnvironment; |
62 | data->ReadEntity (num, 3, "material_property_representation.dependent_environment", ach, STANDARD_TYPE(StepRepr_DataEnvironment), aMaterialPropertyRepresentation_DependentEnvironment); |
63 | |
64 | // Initialize entity |
65 | ent->Init(aDefinition, |
66 | aPropertyDefinitionRepresentation_UsedRepresentation, |
67 | aMaterialPropertyRepresentation_DependentEnvironment); |
68 | } |
69 | |
70 | //======================================================================= |
71 | //function : WriteStep |
72 | //purpose : |
73 | //======================================================================= |
74 | |
75 | void RWStepFEA_RWFeaMaterialPropertyRepresentation::WriteStep (StepData_StepWriter& SW, |
76 | const Handle(StepFEA_FeaMaterialPropertyRepresentation) &ent) const |
77 | { |
78 | |
79 | // Inherited fields of PropertyDefinitionRepresentation |
80 | |
81 | SW.Send (ent->StepRepr_PropertyDefinitionRepresentation::Definition().PropertyDefinition()); |
82 | |
83 | SW.Send (ent->StepRepr_PropertyDefinitionRepresentation::UsedRepresentation()); |
84 | |
85 | // Inherited fields of MaterialPropertyRepresentation |
86 | |
87 | SW.Send (ent->StepRepr_MaterialPropertyRepresentation::DependentEnvironment()); |
88 | } |
89 | |
90 | //======================================================================= |
91 | //function : Share |
92 | //purpose : |
93 | //======================================================================= |
94 | |
95 | void RWStepFEA_RWFeaMaterialPropertyRepresentation::Share (const Handle(StepFEA_FeaMaterialPropertyRepresentation) &ent, |
96 | Interface_EntityIterator& iter) const |
97 | { |
98 | |
99 | // Inherited fields of PropertyDefinitionRepresentation |
100 | |
101 | iter.AddItem (ent->StepRepr_PropertyDefinitionRepresentation::Definition().PropertyDefinition()); |
102 | |
103 | iter.AddItem (ent->StepRepr_PropertyDefinitionRepresentation::UsedRepresentation()); |
104 | |
105 | // Inherited fields of MaterialPropertyRepresentation |
106 | |
107 | iter.AddItem (ent->StepRepr_MaterialPropertyRepresentation::DependentEnvironment()); |
108 | } |