7fd59977 |
1 | // File: RWStepShape_RWDimensionalCharacteristicRepresentation.cxx |
2 | // Created: Tue Apr 18 16:42:58 2000 |
3 | // Author: Andrey BETENEV |
4 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 |
5 | // Copyright: Matra Datavision 1999 |
6 | |
7 | #include <RWStepShape_RWDimensionalCharacteristicRepresentation.ixx> |
8 | |
9 | //======================================================================= |
10 | //function : RWStepShape_RWDimensionalCharacteristicRepresentation |
11 | //purpose : |
12 | //======================================================================= |
13 | |
14 | RWStepShape_RWDimensionalCharacteristicRepresentation::RWStepShape_RWDimensionalCharacteristicRepresentation () |
15 | { |
16 | } |
17 | |
18 | //======================================================================= |
19 | //function : ReadStep |
20 | //purpose : |
21 | //======================================================================= |
22 | |
23 | void RWStepShape_RWDimensionalCharacteristicRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data, |
24 | const Standard_Integer num, |
25 | Handle(Interface_Check)& ach, |
26 | const Handle(StepShape_DimensionalCharacteristicRepresentation) &ent) const |
27 | { |
28 | // Check number of parameters |
29 | if ( ! data->CheckNbParams(num,2,ach,"dimensional_characteristic_representation") ) return; |
30 | |
31 | // Own fields of DimensionalCharacteristicRepresentation |
32 | |
33 | StepShape_DimensionalCharacteristic aDimension; |
34 | data->ReadEntity (num, 1, "dimension", ach, aDimension); |
35 | |
36 | Handle(StepShape_ShapeDimensionRepresentation) aRepresentation; |
37 | data->ReadEntity (num, 2, "representation", ach, STANDARD_TYPE(StepShape_ShapeDimensionRepresentation), aRepresentation); |
38 | |
39 | // Initialize entity |
40 | ent->Init(aDimension, |
41 | aRepresentation); |
42 | } |
43 | |
44 | //======================================================================= |
45 | //function : WriteStep |
46 | //purpose : |
47 | //======================================================================= |
48 | |
49 | void RWStepShape_RWDimensionalCharacteristicRepresentation::WriteStep (StepData_StepWriter& SW, |
50 | const Handle(StepShape_DimensionalCharacteristicRepresentation) &ent) const |
51 | { |
52 | |
53 | // Own fields of DimensionalCharacteristicRepresentation |
54 | |
55 | SW.Send (ent->Dimension().Value()); |
56 | |
57 | SW.Send (ent->Representation()); |
58 | } |
59 | |
60 | //======================================================================= |
61 | //function : Share |
62 | //purpose : |
63 | //======================================================================= |
64 | |
65 | void RWStepShape_RWDimensionalCharacteristicRepresentation::Share (const Handle(StepShape_DimensionalCharacteristicRepresentation) &ent, |
66 | Interface_EntityIterator& iter) const |
67 | { |
68 | |
69 | // Own fields of DimensionalCharacteristicRepresentation |
70 | |
71 | iter.AddItem (ent->Dimension().Value()); |
72 | |
73 | iter.AddItem (ent->Representation()); |
74 | } |