1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 // abv 09.04.99 S4136: eliminate parameter step.readaccept.void
15 // svv #2 23.02.00: porting on SIL
16 #include <StepData.ixx>
17 # include <StepData_Protocol.hxx>
18 # include <StepData_DefaultGeneral.hxx>
19 # include <StepData_FileProtocol.hxx>
20 #include <Interface_Static.hxx>
22 #include <Interface_Statics.hxx>
23 #include <Interface_Macros.hxx>
27 StaticHandle(StepData_Protocol,proto);
28 //svv #2: StaticHandle(StepData_DefaultGeneral,stmod);
30 StaticHandleA(StepData_Protocol,theheader);
33 void StepData::Init ()
35 // InitHandleVoid(StepData_Protocol,proto);
36 // InitHandleVoid(StepData_DefaultGeneral,stmod);
37 //:S4136 Interface_Static::Init("step","step.readaccept.void",'i',"1");
38 // if (proto.IsNull()) proto = new StepData_Protocol;
39 // if (stmod.IsNull()) stmod = new StepData_DefaultGeneral;
42 Handle(StepData_Protocol) StepData::Protocol ()
44 InitHandleVoid(StepData_Protocol,proto);// svv #2
45 // UseHandle(StepData_Protocol,proto);
50 void StepData::AddHeaderProtocol (const Handle(StepData_Protocol)& header)
52 InitHandle(StepData_Protocol,theheader);
53 if (theheader.IsNull()) theheader = header;
55 DeclareAndCast(StepData_FileProtocol,headmult,theheader);
56 if (headmult.IsNull()) {
57 headmult = new StepData_FileProtocol;
58 headmult->Add(theheader);
60 headmult->Add(header);
65 Handle(StepData_Protocol) StepData::HeaderProtocol ()
67 UseHandle(StepData_Protocol,theheader);