1 // Created on: 2002-12-12
2 // Created by: data exchange team
3 // Copyright (c) 2002-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
18 #include <RWStepFEA_RWDummyNode.ixx>
19 #include <StepRepr_HArray1OfRepresentationItem.hxx>
20 #include <StepRepr_RepresentationItem.hxx>
21 #include <StepRepr_RepresentationContext.hxx>
22 #include <StepFEA_FeaModel.hxx>
24 //=======================================================================
25 //function : RWStepFEA_RWDummyNode
27 //=======================================================================
29 RWStepFEA_RWDummyNode::RWStepFEA_RWDummyNode ()
33 //=======================================================================
36 //=======================================================================
38 void RWStepFEA_RWDummyNode::ReadStep (const Handle(StepData_StepReaderData)& data,
39 const Standard_Integer num,
40 Handle(Interface_Check)& ach,
41 const Handle(StepFEA_DummyNode) &ent) const
43 // Check number of parameters
44 if ( ! data->CheckNbParams(num,4,ach,"dummy_node") ) return;
46 // Inherited fields of Representation
48 Handle(TCollection_HAsciiString) aRepresentation_Name;
49 data->ReadString (num, 1, "representation.name", ach, aRepresentation_Name);
51 Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
52 Standard_Integer sub2 = 0;
53 if ( data->ReadSubList (num, 2, "representation.items", ach, sub2) ) {
54 Standard_Integer nb0 = data->NbParams(sub2);
55 aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0);
56 Standard_Integer num2 = sub2;
57 for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
58 Handle(StepRepr_RepresentationItem) anIt0;
59 data->ReadEntity (num2, i0, "representation_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
60 aRepresentation_Items->SetValue(i0, anIt0);
64 Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems;
65 data->ReadEntity (num, 3, "representation.context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
67 // Inherited fields of NodeRepresentation
69 Handle(StepFEA_FeaModel) aNodeRepresentation_ModelRef;
70 data->ReadEntity (num, 4, "node_representation.model_ref", ach, STANDARD_TYPE(StepFEA_FeaModel), aNodeRepresentation_ModelRef);
73 ent->Init(aRepresentation_Name,
74 aRepresentation_Items,
75 aRepresentation_ContextOfItems,
76 aNodeRepresentation_ModelRef);
79 //=======================================================================
80 //function : WriteStep
82 //=======================================================================
84 void RWStepFEA_RWDummyNode::WriteStep (StepData_StepWriter& SW,
85 const Handle(StepFEA_DummyNode) &ent) const
88 // Inherited fields of Representation
90 SW.Send (ent->StepRepr_Representation::Name());
93 for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
94 Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
99 SW.Send (ent->StepRepr_Representation::ContextOfItems());
101 // Inherited fields of NodeRepresentation
103 SW.Send (ent->StepFEA_NodeRepresentation::ModelRef());
106 //=======================================================================
109 //=======================================================================
111 void RWStepFEA_RWDummyNode::Share (const Handle(StepFEA_DummyNode) &ent,
112 Interface_EntityIterator& iter) const
115 // Inherited fields of Representation
117 for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
118 Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
122 iter.AddItem (ent->StepRepr_Representation::ContextOfItems());
124 // Inherited fields of NodeRepresentation
126 iter.AddItem (ent->StepFEA_NodeRepresentation::ModelRef());