b311480e |
1 | // Created on: 1999-11-26 |
2 | // Created by: Andrey BETENEV |
3 | // Copyright (c) 1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 |
7fd59977 |
18 | |
19 | #include <RWStepAP203_RWCcDesignSecurityClassification.ixx> |
20 | #include <StepAP203_HArray1OfClassifiedItem.hxx> |
21 | #include <StepAP203_ClassifiedItem.hxx> |
ec357c5c |
22 | #include <StepBasic_SecurityClassification.hxx> |
7fd59977 |
23 | |
24 | //======================================================================= |
25 | //function : RWStepAP203_RWCcDesignSecurityClassification |
26 | //purpose : |
27 | //======================================================================= |
28 | |
29 | RWStepAP203_RWCcDesignSecurityClassification::RWStepAP203_RWCcDesignSecurityClassification () |
30 | { |
31 | } |
32 | |
33 | //======================================================================= |
34 | //function : ReadStep |
35 | //purpose : |
36 | //======================================================================= |
37 | |
38 | void RWStepAP203_RWCcDesignSecurityClassification::ReadStep (const Handle(StepData_StepReaderData)& data, |
39 | const Standard_Integer num, |
40 | Handle(Interface_Check)& ach, |
41 | const Handle(StepAP203_CcDesignSecurityClassification) &ent) const |
42 | { |
43 | // Check number of parameters |
44 | if ( ! data->CheckNbParams(num,2,ach,"cc_design_security_classification") ) return; |
45 | |
46 | // Inherited fields of SecurityClassificationAssignment |
47 | |
48 | Handle(StepBasic_SecurityClassification) aSecurityClassificationAssignment_AssignedSecurityClassification; |
49 | data->ReadEntity (num, 1, "security_classification_assignment.assigned_security_classification", ach, STANDARD_TYPE(StepBasic_SecurityClassification), aSecurityClassificationAssignment_AssignedSecurityClassification); |
50 | |
51 | // Own fields of CcDesignSecurityClassification |
52 | |
53 | Handle(StepAP203_HArray1OfClassifiedItem) aItems; |
54 | Standard_Integer sub2 = 0; |
55 | if ( data->ReadSubList (num, 2, "items", ach, sub2) ) { |
56 | Standard_Integer num2 = sub2; |
57 | Standard_Integer nb0 = data->NbParams(num2); |
58 | aItems = new StepAP203_HArray1OfClassifiedItem (1, nb0); |
59 | for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { |
60 | StepAP203_ClassifiedItem anIt0; |
61 | data->ReadEntity (num2, i0, "items", ach, anIt0); |
62 | aItems->SetValue(i0, anIt0); |
63 | } |
64 | } |
65 | |
66 | // Initialize entity |
67 | ent->Init(aSecurityClassificationAssignment_AssignedSecurityClassification, |
68 | aItems); |
69 | } |
70 | |
71 | //======================================================================= |
72 | //function : WriteStep |
73 | //purpose : |
74 | //======================================================================= |
75 | |
76 | void RWStepAP203_RWCcDesignSecurityClassification::WriteStep (StepData_StepWriter& SW, |
77 | const Handle(StepAP203_CcDesignSecurityClassification) &ent) const |
78 | { |
79 | |
80 | // Inherited fields of SecurityClassificationAssignment |
81 | |
82 | SW.Send (ent->StepBasic_SecurityClassificationAssignment::AssignedSecurityClassification()); |
83 | |
84 | // Own fields of CcDesignSecurityClassification |
85 | |
86 | SW.OpenSub(); |
87 | for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) { |
88 | StepAP203_ClassifiedItem Var0 = ent->Items()->Value(i1); |
89 | SW.Send (Var0.Value()); |
90 | } |
91 | SW.CloseSub(); |
92 | } |
93 | |
94 | //======================================================================= |
95 | //function : Share |
96 | //purpose : |
97 | //======================================================================= |
98 | |
99 | void RWStepAP203_RWCcDesignSecurityClassification::Share (const Handle(StepAP203_CcDesignSecurityClassification) &ent, |
100 | Interface_EntityIterator& iter) const |
101 | { |
102 | |
103 | // Inherited fields of SecurityClassificationAssignment |
104 | |
105 | iter.AddItem (ent->StepBasic_SecurityClassificationAssignment::AssignedSecurityClassification()); |
106 | |
107 | // Own fields of CcDesignSecurityClassification |
108 | |
109 | for (Standard_Integer i2=1; i2 <= ent->Items()->Length(); i2++ ) { |
110 | StepAP203_ClassifiedItem Var0 = ent->Items()->Value(i2); |
111 | iter.AddItem (Var0.Value()); |
112 | } |
113 | } |