0024157: Parallelization of assembly part of BO
[occt.git] / src / RWStepBasic / RWStepBasic_RWPlaneAngleMeasureWithUnit.cxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
17
7fd59977 18
19#include <RWStepBasic_RWPlaneAngleMeasureWithUnit.ixx>
20#include <StepBasic_NamedUnit.hxx>
21#include <StepBasic_MeasureValueMember.hxx>
22
23#include <TCollection_AsciiString.hxx>
24
25#include <Interface_EntityIterator.hxx>
26
27
28#include <StepBasic_PlaneAngleMeasureWithUnit.hxx>
29
30//=======================================================================
31//function : RWStepBasic_RWPlaneAngleMeasureWithUnit
32//purpose :
33//=======================================================================
34
35RWStepBasic_RWPlaneAngleMeasureWithUnit::RWStepBasic_RWPlaneAngleMeasureWithUnit () {}
36
37//=======================================================================
38//function : ReadStep
39//purpose :
40//=======================================================================
41
42void RWStepBasic_RWPlaneAngleMeasureWithUnit::ReadStep (const Handle(StepData_StepReaderData)& data,
43 const Standard_Integer num,
44 Handle(Interface_Check)& ach,
45 const Handle(StepBasic_PlaneAngleMeasureWithUnit)& ent) const
46{
47 // --- Number of Parameter Control ---
48 if (!data->CheckNbParams(num,2,ach,"plane_angle_measure_with_unit")) return;
49
50 // --- inherited field : valueComponent ---
51 // UPDATE 21-02-96 , 31-MARS-1997 by CKY
52 Handle(StepBasic_MeasureValueMember) mvc = new StepBasic_MeasureValueMember;
53 data->ReadMember (num,1, "value_component", ach, mvc);
54
55 // --- inherited field : unitComponent ---
56 StepBasic_Unit aUnitComponent;
57 data->ReadEntity(num, 2,"unit_component", ach, aUnitComponent);
58
59 //--- Initialisation of the read entity ---
60 ent->Init(mvc, aUnitComponent);
61}
62
63//=======================================================================
64//function : WriteStep
65//purpose :
66//=======================================================================
67
68void RWStepBasic_RWPlaneAngleMeasureWithUnit::WriteStep (StepData_StepWriter& SW,
69 const Handle(StepBasic_PlaneAngleMeasureWithUnit)& ent) const
70{
71 // --- inherited field valueComponent ---
72 SW.Send(ent->ValueComponentMember());
73
74 // --- inherited field unitComponent ---
75 SW.Send(ent->UnitComponent().Value());
76}
77
78//=======================================================================
79//function : Share
80//purpose :
81//=======================================================================
82
83void RWStepBasic_RWPlaneAngleMeasureWithUnit::Share (const Handle(StepBasic_PlaneAngleMeasureWithUnit)& ent,
84 Interface_EntityIterator& iter) const
85{
86 iter.GetOneItem(ent->UnitComponent().Value());
87}
88