0024428: Implementation of LGPL license
[occt.git] / src / RWStepRepr / RWStepRepr_RWStructuralResponseProperty.cxx
CommitLineData
b311480e 1// Created on: 2002-12-15
2// Created by: data exchange team
973c2be1 3// Copyright (c) 2002-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
973c2be1 7// This library is free software; you can redistribute it and / or modify it
8// under the terms of the GNU Lesser General Public 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
7fd59977 16// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
7fd59977 17
18#include <RWStepRepr_RWStructuralResponseProperty.ixx>
19
20//#include <StepRepr_RepresentedDefinition.hxx>
21
22//=======================================================================
23//function : RWStepRepr_RWStructuralResponseProperty
24//purpose :
25//=======================================================================
26
27RWStepRepr_RWStructuralResponseProperty::RWStepRepr_RWStructuralResponseProperty ()
28{
29}
30
31//=======================================================================
32//function : ReadStep
33//purpose :
34//=======================================================================
35
36void RWStepRepr_RWStructuralResponseProperty::ReadStep (const Handle(StepData_StepReaderData)& data,
37 const Standard_Integer num,
38 Handle(Interface_Check)& ach,
39 const Handle(StepRepr_StructuralResponseProperty) &ent) const
40{
41 // Check number of parameters
42 if ( ! data->CheckNbParams(num,3,ach,"structural_response_property") ) return;
43
44 // Inherited fields of PropertyDefinition
45
46 Handle(TCollection_HAsciiString) aPropertyDefinition_Name;
47 data->ReadString (num, 1, "property_definition.name", ach, aPropertyDefinition_Name);
48
49 Handle(TCollection_HAsciiString) aPropertyDefinition_Description;
50 data->ReadString (num, 2, "property_definition.description", ach, aPropertyDefinition_Description);
51
52 StepRepr_CharacterizedDefinition aPropertyDefinition_Definition;
53 data->ReadEntity (num, 3, "property_definition.definition", ach, aPropertyDefinition_Definition);
54
55 // Initialize entity
56 ent->Init(aPropertyDefinition_Name, Standard_True,
57 aPropertyDefinition_Description,
58 aPropertyDefinition_Definition);
59}
60
61//=======================================================================
62//function : WriteStep
63//purpose :
64//=======================================================================
65
66void RWStepRepr_RWStructuralResponseProperty::WriteStep (StepData_StepWriter& SW,
67 const Handle(StepRepr_StructuralResponseProperty) &ent) const
68{
69
70 // Inherited fields of PropertyDefinition
71
72 SW.Send (ent->StepRepr_PropertyDefinition::Name());
73
74 SW.Send (ent->StepRepr_PropertyDefinition::Description());
75
76 SW.Send (ent->StepRepr_PropertyDefinition::Definition().Value());
77}
78
79//=======================================================================
80//function : Share
81//purpose :
82//=======================================================================
83
84void RWStepRepr_RWStructuralResponseProperty::Share (const Handle(StepRepr_StructuralResponseProperty) &ent,
85 Interface_EntityIterator& iter) const
86{
87
88 // Inherited fields of PropertyDefinition
89
90 iter.AddItem (ent->StepRepr_PropertyDefinition::Definition().Value());
91}