0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / RWStepShape / RWStepShape_RWToleranceValue.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Interface_Check.hxx>
16 #include <Interface_EntityIterator.hxx>
17 #include <RWStepShape_RWToleranceValue.hxx>
18 #include <StepBasic_MeasureWithUnit.hxx>
19 #include <StepData_StepReaderData.hxx>
20 #include <StepData_StepWriter.hxx>
21 #include <StepShape_ToleranceValue.hxx>
22
23 RWStepShape_RWToleranceValue::RWStepShape_RWToleranceValue () {}
24
25 void RWStepShape_RWToleranceValue::ReadStep
26         (const Handle(StepData_StepReaderData)& data,
27          const Standard_Integer num,
28          Handle(Interface_Check)& ach,
29          const Handle(StepShape_ToleranceValue)& ent) const
30 {
31         // --- Number of Parameter Control ---
32
33         if (!data->CheckNbParams(num,2,ach,"tolerance_value")) return;
34
35         // --- own field : lower_bound ---
36
37         Handle(StepBasic_MeasureWithUnit) LB;
38         data->ReadEntity (num,1,"lower_bound",ach,
39                           STANDARD_TYPE(StepBasic_MeasureWithUnit),LB);
40
41         // --- own field : upper_bound ---
42
43         Handle(StepBasic_MeasureWithUnit) UB;
44         data->ReadEntity (num,2,"upper_bound",ach,
45                           STANDARD_TYPE(StepBasic_MeasureWithUnit),UB);
46
47         //--- Initialisation of the read entity ---
48
49         ent->Init(LB,UB);
50 }
51
52
53 void RWStepShape_RWToleranceValue::WriteStep
54         (StepData_StepWriter& SW,
55          const Handle(StepShape_ToleranceValue)& ent) const
56 {
57   SW.Send (ent->LowerBound());
58   SW.Send (ent->UpperBound());
59 }
60
61
62 void RWStepShape_RWToleranceValue::Share(const Handle(StepShape_ToleranceValue)& ent, Interface_EntityIterator& iter) const
63 {
64   iter.AddItem (ent->LowerBound());
65   iter.AddItem (ent->UpperBound());
66 }
67