Warnings on vc14 were eliminated
[occt.git] / src / RWStepRepr / RWStepRepr_RWConfigurationEffectivity.cxx
1 // Created on: 1999-11-26
2 // Created by: Andrey BETENEV
3 // Copyright (c) 1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
18
19 #include <Interface_Check.hxx>
20 #include <Interface_EntityIterator.hxx>
21 #include <RWStepRepr_RWConfigurationEffectivity.hxx>
22 #include <StepBasic_ProductDefinitionRelationship.hxx>
23 #include <StepData_StepReaderData.hxx>
24 #include <StepData_StepWriter.hxx>
25 #include <StepRepr_ConfigurationDesign.hxx>
26 #include <StepRepr_ConfigurationEffectivity.hxx>
27
28 //=======================================================================
29 //function : RWStepRepr_RWConfigurationEffectivity
30 //purpose  : 
31 //=======================================================================
32 RWStepRepr_RWConfigurationEffectivity::RWStepRepr_RWConfigurationEffectivity ()
33 {
34 }
35
36 //=======================================================================
37 //function : ReadStep
38 //purpose  : 
39 //=======================================================================
40
41 void RWStepRepr_RWConfigurationEffectivity::ReadStep (const Handle(StepData_StepReaderData)& data,
42                                                       const Standard_Integer num,
43                                                       Handle(Interface_Check)& ach,
44                                                       const Handle(StepRepr_ConfigurationEffectivity) &ent) const
45 {
46   // Check number of parameters
47   if ( ! data->CheckNbParams(num,3,ach,"configuration_effectivity") ) return;
48
49   // Inherited fields of Effectivity
50
51   Handle(TCollection_HAsciiString) aEffectivity_Id;
52   data->ReadString (num, 1, "effectivity.id", ach, aEffectivity_Id);
53
54   // Inherited fields of ProductDefinitionEffectivity
55
56   Handle(StepBasic_ProductDefinitionRelationship) aProductDefinitionEffectivity_Usage;
57   data->ReadEntity (num, 2, "product_definition_effectivity.usage", ach, STANDARD_TYPE(StepBasic_ProductDefinitionRelationship), aProductDefinitionEffectivity_Usage);
58
59   // Own fields of ConfigurationEffectivity
60
61   Handle(StepRepr_ConfigurationDesign) aConfiguration;
62   data->ReadEntity (num, 3, "configuration", ach, STANDARD_TYPE(StepRepr_ConfigurationDesign), aConfiguration);
63
64   // Initialize entity
65   ent->Init(aEffectivity_Id,
66             aProductDefinitionEffectivity_Usage,
67             aConfiguration);
68 }
69
70 //=======================================================================
71 //function : WriteStep
72 //purpose  : 
73 //=======================================================================
74
75 void RWStepRepr_RWConfigurationEffectivity::WriteStep (StepData_StepWriter& SW,
76                                                        const Handle(StepRepr_ConfigurationEffectivity) &ent) const
77 {
78
79   // Inherited fields of Effectivity
80
81   SW.Send (ent->StepBasic_Effectivity::Id());
82
83   // Inherited fields of ProductDefinitionEffectivity
84
85   SW.Send (ent->StepBasic_ProductDefinitionEffectivity::Usage());
86
87   // Own fields of ConfigurationEffectivity
88
89   SW.Send (ent->Configuration());
90 }
91
92 //=======================================================================
93 //function : Share
94 //purpose  : 
95 //=======================================================================
96
97 void RWStepRepr_RWConfigurationEffectivity::Share (const Handle(StepRepr_ConfigurationEffectivity) &ent,
98                                                    Interface_EntityIterator& iter) const
99 {
100
101   // Inherited fields of Effectivity
102
103   // Inherited fields of ProductDefinitionEffectivity
104
105   iter.AddItem (ent->StepBasic_ProductDefinitionEffectivity::Usage());
106
107   // Own fields of ConfigurationEffectivity
108
109   iter.AddItem (ent->Configuration());
110 }