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
7 #include <RWStepShape_RWShapeDefinitionRepresentation.ixx>
9 //=======================================================================
10 //function : RWStepShape_RWShapeDefinitionRepresentation
12 //=======================================================================
14 RWStepShape_RWShapeDefinitionRepresentation::RWStepShape_RWShapeDefinitionRepresentation ()
18 //=======================================================================
21 //=======================================================================
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
28 // Check number of parameters
29 if ( ! data->CheckNbParams(num,2,ach,"shape_definition_representation") ) return;
31 // Inherited fields of PropertyDefinitionRepresentation
33 StepRepr_RepresentedDefinition aPropertyDefinitionRepresentation_Definition;
34 data->ReadEntity (num, 1, "property_definition_representation.definition", ach, aPropertyDefinitionRepresentation_Definition);
36 Handle(StepRepr_Representation) aPropertyDefinitionRepresentation_UsedRepresentation;
37 data->ReadEntity (num, 2, "property_definition_representation.used_representation", ach, STANDARD_TYPE(StepRepr_Representation), aPropertyDefinitionRepresentation_UsedRepresentation);
40 ent->Init(aPropertyDefinitionRepresentation_Definition,
41 aPropertyDefinitionRepresentation_UsedRepresentation);
44 //=======================================================================
45 //function : WriteStep
47 //=======================================================================
49 void RWStepShape_RWShapeDefinitionRepresentation::WriteStep (StepData_StepWriter& SW,
50 const Handle(StepShape_ShapeDefinitionRepresentation) &ent) const
53 // Inherited fields of PropertyDefinitionRepresentation
55 SW.Send (ent->StepRepr_PropertyDefinitionRepresentation::Definition().Value());
57 SW.Send (ent->StepRepr_PropertyDefinitionRepresentation::UsedRepresentation());
60 //=======================================================================
63 //=======================================================================
65 void RWStepShape_RWShapeDefinitionRepresentation::Share (const Handle(StepShape_ShapeDefinitionRepresentation) &ent,
66 Interface_EntityIterator& iter) const
69 // Inherited fields of PropertyDefinitionRepresentation
71 iter.AddItem (ent->StepRepr_PropertyDefinitionRepresentation::Definition().Value());
73 iter.AddItem (ent->StepRepr_PropertyDefinitionRepresentation::UsedRepresentation());