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_RWParametricRepresentationContext.ixx> |
15 | |
16 | |
17 | RWStepRepr_RWParametricRepresentationContext::RWStepRepr_RWParametricRepresentationContext () {} |
18 | |
19 | void RWStepRepr_RWParametricRepresentationContext::ReadStep |
20 | (const Handle(StepData_StepReaderData)& data, |
21 | const Standard_Integer num, |
22 | Handle(Interface_Check)& ach, |
23 | const Handle(StepRepr_ParametricRepresentationContext)& ent) const |
24 | { |
25 | |
26 | |
27 | // --- Number of Parameter Control --- |
28 | |
29 | if (!data->CheckNbParams(num,2,ach,"parametric_representation_context")) return; |
30 | |
31 | // --- inherited field : contextIdentifier --- |
32 | |
33 | Handle(TCollection_HAsciiString) aContextIdentifier; |
34 | //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed |
35 | data->ReadString (num,1,"context_identifier",ach,aContextIdentifier); |
36 | |
37 | // --- inherited field : contextType --- |
38 | |
39 | Handle(TCollection_HAsciiString) aContextType; |
40 | //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed |
41 | data->ReadString (num,2,"context_type",ach,aContextType); |
42 | |
43 | //--- Initialisation of the read entity --- |
44 | |
45 | |
46 | ent->Init(aContextIdentifier, aContextType); |
47 | } |
48 | |
49 | |
50 | void RWStepRepr_RWParametricRepresentationContext::WriteStep |
51 | (StepData_StepWriter& SW, |
52 | const Handle(StepRepr_ParametricRepresentationContext)& ent) const |
53 | { |
54 | |
55 | // --- inherited field contextIdentifier --- |
56 | |
57 | SW.Send(ent->ContextIdentifier()); |
58 | |
59 | // --- inherited field contextType --- |
60 | |
61 | SW.Send(ent->ContextType()); |
62 | } |