0023947: Eliminate trivial compiler warnings in MSVC++ with warning level 4
[occt.git] / src / RWStepAP214 / RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.cxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
17
7fd59977 18
19#include <RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.ixx>
20#include <StepAP214_HArray1OfAutoDesignDateAndTimeItem.hxx>
21#include <StepAP214_AutoDesignDateAndTimeItem.hxx>
22#include <StepBasic_DateAndTime.hxx>
23#include <StepBasic_DateTimeRole.hxx>
24
25
26#include <Interface_EntityIterator.hxx>
27
28
29#include <StepAP214_AutoDesignNominalDateAndTimeAssignment.hxx>
30
31
32RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment::RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment () {}
33
34void RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment::ReadStep
35 (const Handle(StepData_StepReaderData)& data,
36 const Standard_Integer num,
37 Handle(Interface_Check)& ach,
38 const Handle(StepAP214_AutoDesignNominalDateAndTimeAssignment)& ent) const
39{
40
41
42 // --- Number of Parameter Control ---
43
44 if (!data->CheckNbParams(num,3,ach,"auto_design_nominal_date_and_time_assignment")) return;
45
46 // --- inherited field : assignedDateAndTime ---
47
48 Handle(StepBasic_DateAndTime) aAssignedDateAndTime;
302f96fb 49 data->ReadEntity(num, 1,"assigned_date_and_time", ach, STANDARD_TYPE(StepBasic_DateAndTime), aAssignedDateAndTime);
7fd59977 50
51 // --- inherited field : role ---
52
53 Handle(StepBasic_DateTimeRole) aRole;
302f96fb 54 data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateTimeRole), aRole);
7fd59977 55
56 // --- own field : items ---
57
58 Handle(StepAP214_HArray1OfAutoDesignDateAndTimeItem) aItems;
59 StepAP214_AutoDesignDateAndTimeItem aItemsItem;
60 Standard_Integer nsub3;
61 if (data->ReadSubList (num,3,"items",ach,nsub3)) {
62 Standard_Integer nb3 = data->NbParams(nsub3);
63 aItems = new StepAP214_HArray1OfAutoDesignDateAndTimeItem (1, nb3);
64 for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
65 Standard_Boolean stat3 = data->ReadEntity
66 (nsub3,i3,"items",ach,aItemsItem);
67 if (stat3) aItems->SetValue(i3,aItemsItem);
68 }
69 }
70
71 //--- Initialisation of the read entity ---
72
73
74 ent->Init(aAssignedDateAndTime, aRole, aItems);
75}
76
77
78void RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment::WriteStep
79 (StepData_StepWriter& SW,
80 const Handle(StepAP214_AutoDesignNominalDateAndTimeAssignment)& ent) const
81{
82
83 // --- inherited field assignedDateAndTime ---
84
85 SW.Send(ent->AssignedDateAndTime());
86
87 // --- inherited field role ---
88
89 SW.Send(ent->Role());
90
91 // --- own field : items ---
92
93 SW.OpenSub();
94 for (Standard_Integer i3 = 1; i3 <= ent->NbItems(); i3 ++) {
95 SW.Send(ent->ItemsValue(i3).Value());
96 }
97 SW.CloseSub();
98}
99
100
101void RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment::Share(const Handle(StepAP214_AutoDesignNominalDateAndTimeAssignment)& ent, Interface_EntityIterator& iter) const
102{
103
104 iter.GetOneItem(ent->AssignedDateAndTime());
105
106
107 iter.GetOneItem(ent->Role());
108
109
110 Standard_Integer nbElem3 = ent->NbItems();
111 for (Standard_Integer is3=1; is3<=nbElem3; is3 ++) {
112 iter.GetOneItem(ent->ItemsValue(is3).Value());
113 }
114
115}
116