0024428: Implementation of LGPL license
[occt.git] / src / RWStepRepr / RWStepRepr_RWDescriptiveRepresentationItem.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
973c2be1 5// This library is free software; you can redistribute it and / or modify it
6// under the terms of the GNU Lesser General Public 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.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
7fd59977 13
14#include <RWStepRepr_RWDescriptiveRepresentationItem.ixx>
15
16
17RWStepRepr_RWDescriptiveRepresentationItem::RWStepRepr_RWDescriptiveRepresentationItem () {}
18
19void RWStepRepr_RWDescriptiveRepresentationItem::ReadStep
20 (const Handle(StepData_StepReaderData)& data,
21 const Standard_Integer num,
22 Handle(Interface_Check)& ach,
23 const Handle(StepRepr_DescriptiveRepresentationItem)& ent) const
24{
25
26
27 // --- Number of Parameter Control ---
28
29 if (!data->CheckNbParams(num,2,ach,"descriptive_representation_item")) return;
30
31 // --- inherited field : name ---
32
33 Handle(TCollection_HAsciiString) aName;
34 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
35 data->ReadString (num,1,"name",ach,aName);
36
37 // --- own field : description ---
38
39 Handle(TCollection_HAsciiString) aDescription;
40 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
41 data->ReadString (num,2,"description",ach,aDescription);
42
43 //--- Initialisation of the read entity ---
44
45
46 ent->Init(aName, aDescription);
47}
48
49
50void RWStepRepr_RWDescriptiveRepresentationItem::WriteStep
51 (StepData_StepWriter& SW,
52 const Handle(StepRepr_DescriptiveRepresentationItem)& ent) const
53{
54
55 // --- inherited field name ---
56
57 SW.Send(ent->Name());
58
59 // --- own field : description ---
60
61 SW.Send(ent->Description());
62}