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 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
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. |
b311480e |
13 | |
7fd59977 |
14 | //:S4134: abv 03.03.99: implementation of PreDefinedColour modified |
15 | |
16 | #include <RWStepVisual_RWPreDefinedColour.ixx> |
17 | #include <StepVisual_PreDefinedItem.hxx> |
18 | |
19 | RWStepVisual_RWPreDefinedColour::RWStepVisual_RWPreDefinedColour () {} |
20 | |
21 | void RWStepVisual_RWPreDefinedColour::ReadStep |
22 | (const Handle(StepData_StepReaderData)& data, |
23 | const Standard_Integer num, |
24 | Handle(Interface_Check)& ach, |
25 | const Handle(StepVisual_PreDefinedColour)& ent) const |
26 | { |
27 | |
28 | |
29 | // --- Number of Parameter Control --- |
30 | |
31 | if (!data->CheckNbParams(num,1,ach,"pre_defined_colour")) return; |
32 | |
33 | // --- inherited field : name --- |
34 | |
35 | Handle(TCollection_HAsciiString) aName; |
36 | //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed |
37 | data->ReadString (num,1,"name",ach,aName); |
38 | |
39 | //--- Initialisation of the read entity --- |
40 | |
41 | |
42 | ent->GetPreDefinedItem()->Init(aName); |
43 | } |
44 | |
45 | |
46 | void RWStepVisual_RWPreDefinedColour::WriteStep |
47 | (StepData_StepWriter& SW, |
48 | const Handle(StepVisual_PreDefinedColour)& ent) const |
49 | { |
50 | |
51 | // --- inherited field name --- |
52 | |
53 | SW.Send(ent->GetPreDefinedItem()->Name()); |
54 | } |