0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / RWStepShape / RWStepShape_RWShapeDefinitionRepresentation.cxx
1 // File:        RWStepShape_RWShapeDefinitionRepresentation.cxx
2 // Created:     Fri Nov 26 16:26:39 1999 
3 // Author:      Andrey BETENEV
4 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
5 // Copyright:   Matra Datavision 1999
6
7 #include <RWStepShape_RWShapeDefinitionRepresentation.ixx>
8
9 //=======================================================================
10 //function : RWStepShape_RWShapeDefinitionRepresentation
11 //purpose  : 
12 //=======================================================================
13
14 RWStepShape_RWShapeDefinitionRepresentation::RWStepShape_RWShapeDefinitionRepresentation ()
15 {
16 }
17
18 //=======================================================================
19 //function : ReadStep
20 //purpose  : 
21 //=======================================================================
22
23 void RWStepShape_RWShapeDefinitionRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data,
24                                                             const Standard_Integer num,
25                                                             Handle(Interface_Check)& ach,
26                                                             const Handle(StepShape_ShapeDefinitionRepresentation) &ent) const
27 {
28   // Check number of parameters
29   if ( ! data->CheckNbParams(num,2,ach,"shape_definition_representation") ) return;
30
31   // Inherited fields of PropertyDefinitionRepresentation
32
33   StepRepr_RepresentedDefinition aPropertyDefinitionRepresentation_Definition;
34   data->ReadEntity (num, 1, "property_definition_representation.definition", ach, aPropertyDefinitionRepresentation_Definition);
35
36   Handle(StepRepr_Representation) aPropertyDefinitionRepresentation_UsedRepresentation;
37   data->ReadEntity (num, 2, "property_definition_representation.used_representation", ach, STANDARD_TYPE(StepRepr_Representation), aPropertyDefinitionRepresentation_UsedRepresentation);
38
39   // Initialize entity
40   ent->Init(aPropertyDefinitionRepresentation_Definition,
41             aPropertyDefinitionRepresentation_UsedRepresentation);
42 }
43
44 //=======================================================================
45 //function : WriteStep
46 //purpose  : 
47 //=======================================================================
48
49 void RWStepShape_RWShapeDefinitionRepresentation::WriteStep (StepData_StepWriter& SW,
50                                                              const Handle(StepShape_ShapeDefinitionRepresentation) &ent) const
51 {
52
53   // Inherited fields of PropertyDefinitionRepresentation
54
55   SW.Send (ent->StepRepr_PropertyDefinitionRepresentation::Definition().Value());
56
57   SW.Send (ent->StepRepr_PropertyDefinitionRepresentation::UsedRepresentation());
58 }
59
60 //=======================================================================
61 //function : Share
62 //purpose  : 
63 //=======================================================================
64
65 void RWStepShape_RWShapeDefinitionRepresentation::Share (const Handle(StepShape_ShapeDefinitionRepresentation) &ent,
66                                                          Interface_EntityIterator& iter) const
67 {
68
69   // Inherited fields of PropertyDefinitionRepresentation
70
71   iter.AddItem (ent->StepRepr_PropertyDefinitionRepresentation::Definition().Value());
72
73   iter.AddItem (ent->StepRepr_PropertyDefinitionRepresentation::UsedRepresentation());
74 }