0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / RWStepBasic / RWStepBasic_RWProductDefinitionFormationRelationship.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//
d5f74e42 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
973c2be1 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
42cf5bc1 18#include <Interface_Check.hxx>
19#include <Interface_EntityIterator.hxx>
20#include <RWStepBasic_RWProductDefinitionFormationRelationship.hxx>
ec357c5c 21#include <StepBasic_ProductDefinitionFormation.hxx>
42cf5bc1 22#include <StepBasic_ProductDefinitionFormationRelationship.hxx>
23#include <StepData_StepReaderData.hxx>
24#include <StepData_StepWriter.hxx>
7fd59977 25
26//=======================================================================
27//function : RWStepBasic_RWProductDefinitionFormationRelationship
28//purpose :
29//=======================================================================
7fd59977 30RWStepBasic_RWProductDefinitionFormationRelationship::RWStepBasic_RWProductDefinitionFormationRelationship ()
31{
32}
33
34//=======================================================================
35//function : ReadStep
36//purpose :
37//=======================================================================
38
39void RWStepBasic_RWProductDefinitionFormationRelationship::ReadStep (const Handle(StepData_StepReaderData)& data,
40 const Standard_Integer num,
41 Handle(Interface_Check)& ach,
42 const Handle(StepBasic_ProductDefinitionFormationRelationship) &ent) const
43{
44 // Check number of parameters
45 if ( ! data->CheckNbParams(num,5,ach,"product_definition_formation_relationship") ) return;
46
47 // Own fields of ProductDefinitionFormationRelationship
48
49 Handle(TCollection_HAsciiString) aId;
50 data->ReadString (num, 1, "id", ach, aId);
51
52 Handle(TCollection_HAsciiString) aName;
53 data->ReadString (num, 2, "name", ach, aName);
54
55 Handle(TCollection_HAsciiString) aDescription;
56 data->ReadString (num, 3, "description", ach, aDescription);
57
58 Handle(StepBasic_ProductDefinitionFormation) aRelatingProductDefinitionFormation;
59 data->ReadEntity (num, 4, "relating_product_definition_formation", ach, STANDARD_TYPE(StepBasic_ProductDefinitionFormation), aRelatingProductDefinitionFormation);
60
61 Handle(StepBasic_ProductDefinitionFormation) aRelatedProductDefinitionFormation;
62 data->ReadEntity (num, 5, "related_product_definition_formation", ach, STANDARD_TYPE(StepBasic_ProductDefinitionFormation), aRelatedProductDefinitionFormation);
63
64 // Initialize entity
65 ent->Init(aId,
66 aName,
67 aDescription,
68 aRelatingProductDefinitionFormation,
69 aRelatedProductDefinitionFormation);
70}
71
72//=======================================================================
73//function : WriteStep
74//purpose :
75//=======================================================================
76
77void RWStepBasic_RWProductDefinitionFormationRelationship::WriteStep (StepData_StepWriter& SW,
78 const Handle(StepBasic_ProductDefinitionFormationRelationship) &ent) const
79{
80
81 // Own fields of ProductDefinitionFormationRelationship
82
83 SW.Send (ent->Id());
84
85 SW.Send (ent->Name());
86
87 SW.Send (ent->Description());
88
89 SW.Send (ent->RelatingProductDefinitionFormation());
90
91 SW.Send (ent->RelatedProductDefinitionFormation());
92}
93
94//=======================================================================
95//function : Share
96//purpose :
97//=======================================================================
98
99void RWStepBasic_RWProductDefinitionFormationRelationship::Share (const Handle(StepBasic_ProductDefinitionFormationRelationship) &ent,
100 Interface_EntityIterator& iter) const
101{
102
103 // Own fields of ProductDefinitionFormationRelationship
104
105 iter.AddItem (ent->RelatingProductDefinitionFormation());
106
107 iter.AddItem (ent->RelatedProductDefinitionFormation());
108}