0024158: OpenGl_AspectMarker - debug assert on destruction of Alpha texture shared...
[occt.git] / src / RWStepAP214 / RWStepAP214_RWAppliedGroupAssignment.cxx
CommitLineData
b311480e 1// Created on: 2000-05-10
2// Created by: Andrey BETENEV
3// Copyright (c) 2000-2012 OPEN CASCADE SAS
4//
5// The content of this file is subject to the Open CASCADE Technology Public
6// License Version 6.5 (the "License"). You may not use the content of this file
7// except in compliance with the License. Please obtain a copy of the License
8// at http://www.opencascade.org and read it completely before using this file.
9//
10// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12//
13// The Original Code and all software distributed under the License is
14// distributed on an "AS IS" basis, without warranty of any kind, and the
15// Initial Developer hereby disclaims all such warranties, including without
16// limitation, any warranties of merchantability, fitness for a particular
17// purpose or non-infringement. Please see the License for the specific terms
18// and conditions governing the rights and limitations under the License.
19
7fd59977 20// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
7fd59977 21
22#include <RWStepAP214_RWAppliedGroupAssignment.ixx>
23#include <StepAP214_HArray1OfGroupItem.hxx>
24#include <StepAP214_GroupItem.hxx>
25
26//=======================================================================
27//function : RWStepAP214_RWAppliedGroupAssignment
28//purpose :
29//=======================================================================
30
31RWStepAP214_RWAppliedGroupAssignment::RWStepAP214_RWAppliedGroupAssignment ()
32{
33}
34
35//=======================================================================
36//function : ReadStep
37//purpose :
38//=======================================================================
39
40void RWStepAP214_RWAppliedGroupAssignment::ReadStep (const Handle(StepData_StepReaderData)& data,
41 const Standard_Integer num,
42 Handle(Interface_Check)& ach,
43 const Handle(StepAP214_AppliedGroupAssignment) &ent) const
44{
45 // Check number of parameters
46 if ( ! data->CheckNbParams(num,2,ach,"applied_group_assignment") ) return;
47
48 // Inherited fields of GroupAssignment
49
50 Handle(StepBasic_Group) aGroupAssignment_AssignedGroup;
51 data->ReadEntity (num, 1, "group_assignment.assigned_group", ach, STANDARD_TYPE(StepBasic_Group), aGroupAssignment_AssignedGroup);
52
53 // Own fields of AppliedGroupAssignment
54
55 Handle(StepAP214_HArray1OfGroupItem) aItems;
56 Standard_Integer sub2 = 0;
57 if ( data->ReadSubList (num, 2, "items", ach, sub2) ) {
58 Standard_Integer num2 = sub2;
59 Standard_Integer nb0 = data->NbParams(num2);
60 aItems = new StepAP214_HArray1OfGroupItem (1, nb0);
61 for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
62 StepAP214_GroupItem anIt0;
63 data->ReadEntity (num2, i0, "items", ach, anIt0);
64 aItems->SetValue(i0, anIt0);
65 }
66 }
67
68 // Initialize entity
69 ent->Init(aGroupAssignment_AssignedGroup,
70 aItems);
71}
72
73//=======================================================================
74//function : WriteStep
75//purpose :
76//=======================================================================
77
78void RWStepAP214_RWAppliedGroupAssignment::WriteStep (StepData_StepWriter& SW,
79 const Handle(StepAP214_AppliedGroupAssignment) &ent) const
80{
81
82 // Inherited fields of GroupAssignment
83
84 SW.Send (ent->StepBasic_GroupAssignment::AssignedGroup());
85
86 // Own fields of AppliedGroupAssignment
87
88 SW.OpenSub();
89 for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) {
90 StepAP214_GroupItem Var0 = ent->Items()->Value(i1);
91 SW.Send (Var0.Value());
92 }
93 SW.CloseSub();
94}
95
96//=======================================================================
97//function : Share
98//purpose :
99//=======================================================================
100
101void RWStepAP214_RWAppliedGroupAssignment::Share (const Handle(StepAP214_AppliedGroupAssignment) &ent,
102 Interface_EntityIterator& iter) const
103{
104
105 // Inherited fields of GroupAssignment
106
107 iter.AddItem (ent->StepBasic_GroupAssignment::AssignedGroup());
108
109 // Own fields of AppliedGroupAssignment
110
111 for (Standard_Integer i2=1; i2 <= ent->Items()->Length(); i2++ ) {
112 StepAP214_GroupItem Var0 = ent->Items()->Value(i2);
113 iter.AddItem (Var0.Value());
114 }
115}