0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWProductConceptContext.cxx
... / ...
CommitLineData
1// File: RWStepBasic_RWProductConceptContext.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 <RWStepBasic_RWProductConceptContext.ixx>
8
9//=======================================================================
10//function : RWStepBasic_RWProductConceptContext
11//purpose :
12//=======================================================================
13
14RWStepBasic_RWProductConceptContext::RWStepBasic_RWProductConceptContext ()
15{
16}
17
18//=======================================================================
19//function : ReadStep
20//purpose :
21//=======================================================================
22
23void RWStepBasic_RWProductConceptContext::ReadStep (const Handle(StepData_StepReaderData)& data,
24 const Standard_Integer num,
25 Handle(Interface_Check)& ach,
26 const Handle(StepBasic_ProductConceptContext) &ent) const
27{
28 // Check number of parameters
29 if ( ! data->CheckNbParams(num,3,ach,"product_concept_context") ) return;
30
31 // Inherited fields of ApplicationContextElement
32
33 Handle(TCollection_HAsciiString) aApplicationContextElement_Name;
34 data->ReadString (num, 1, "application_context_element.name", ach, aApplicationContextElement_Name);
35
36 Handle(StepBasic_ApplicationContext) aApplicationContextElement_FrameOfReference;
37 data->ReadEntity (num, 2, "application_context_element.frame_of_reference", ach, STANDARD_TYPE(StepBasic_ApplicationContext), aApplicationContextElement_FrameOfReference);
38
39 // Own fields of ProductConceptContext
40
41 Handle(TCollection_HAsciiString) aMarketSegmentType;
42 data->ReadString (num, 3, "market_segment_type", ach, aMarketSegmentType);
43
44 // Initialize entity
45 ent->Init(aApplicationContextElement_Name,
46 aApplicationContextElement_FrameOfReference,
47 aMarketSegmentType);
48}
49
50//=======================================================================
51//function : WriteStep
52//purpose :
53//=======================================================================
54
55void RWStepBasic_RWProductConceptContext::WriteStep (StepData_StepWriter& SW,
56 const Handle(StepBasic_ProductConceptContext) &ent) const
57{
58
59 // Inherited fields of ApplicationContextElement
60
61 SW.Send (ent->StepBasic_ApplicationContextElement::Name());
62
63 SW.Send (ent->StepBasic_ApplicationContextElement::FrameOfReference());
64
65 // Own fields of ProductConceptContext
66
67 SW.Send (ent->MarketSegmentType());
68}
69
70//=======================================================================
71//function : Share
72//purpose :
73//=======================================================================
74
75void RWStepBasic_RWProductConceptContext::Share (const Handle(StepBasic_ProductConceptContext) &ent,
76 Interface_EntityIterator& iter) const
77{
78
79 // Inherited fields of ApplicationContextElement
80
81 iter.AddItem (ent->StepBasic_ApplicationContextElement::FrameOfReference());
82
83 // Own fields of ProductConceptContext
84}