Warnings on vc14 were eliminated
[occt.git] / src / RWStepShape / RWStepShape_RWContextDependentShapeRepresentation.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
7fd59977 13
7fd59977 14
42cf5bc1 15#include <Interface_Check.hxx>
7fd59977 16#include <Interface_EntityIterator.hxx>
42cf5bc1 17#include <RWStepShape_RWContextDependentShapeRepresentation.hxx>
18#include <StepData_StepReaderData.hxx>
19#include <StepData_StepWriter.hxx>
20#include <StepRepr_ProductDefinitionShape.hxx>
21#include <StepRepr_ShapeRepresentationRelationship.hxx>
7fd59977 22#include <StepShape_ContextDependentShapeRepresentation.hxx>
42cf5bc1 23#include <StepShape_ShapeDefinitionRepresentation.hxx>
7fd59977 24
42cf5bc1 25// pour Share
7fd59977 26//=======================================================================
27//function : RWStepShape_RWContextDependentShapeRepresentation
28//purpose :
29//=======================================================================
7fd59977 30RWStepShape_RWContextDependentShapeRepresentation::RWStepShape_RWContextDependentShapeRepresentation()
31{
32}
33
34
35//=======================================================================
36//function : ReadStep
37//purpose :
38//=======================================================================
39
40void RWStepShape_RWContextDependentShapeRepresentation::ReadStep
41 (const Handle(StepData_StepReaderData)& data,
42 const Standard_Integer num,
43 Handle(Interface_Check)& ach,
44 const Handle(StepShape_ContextDependentShapeRepresentation)& ent) const
45{
46 // --- Number of Parameter Control ---
47
48 if (!data->CheckNbParams(num,2,ach,"context_dependent_shape_representation")) return;
49
50 // --- own field : representation_relation ---
51
52 Handle(StepRepr_ShapeRepresentationRelationship) aRepRel;
53 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
54 data->ReadEntity(num, 1,"representation_relation", ach, STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship), aRepRel);
55
56 // --- own field : represented_product_relation ---
57
58 Handle(StepRepr_ProductDefinitionShape) aProRel;
59 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
60 data->ReadEntity(num, 2,"represented_product_relation", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aProRel);
61
62 ent->Init(aRepRel, aProRel);
63}
64
65
66//=======================================================================
67//function : WriteStep
68//purpose :
69//=======================================================================
70
71void RWStepShape_RWContextDependentShapeRepresentation::WriteStep
72 (StepData_StepWriter& SW,
73 const Handle(StepShape_ContextDependentShapeRepresentation)& ent) const
74{
75 SW.Send(ent->RepresentationRelation());
76 SW.Send(ent->RepresentedProductRelation());
77}
78
79
80//=======================================================================
81//function : Share
82//purpose :
83//=======================================================================
84
85void RWStepShape_RWContextDependentShapeRepresentation::Share
86 (const Handle(StepShape_ContextDependentShapeRepresentation)& ent,
87 Interface_EntityIterator& iter) const
88{
89 iter.AddItem(ent->RepresentationRelation());
90 iter.AddItem(ent->RepresentedProductRelation());
91}
92