0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / StepData / StepData.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
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>
21
22 #include <Interface_Statics.hxx>
23 #include <Interface_Macros.hxx>
24
25
26
27 StaticHandle(StepData_Protocol,proto);
28 //svv #2: StaticHandle(StepData_DefaultGeneral,stmod);
29
30 StaticHandleA(StepData_Protocol,theheader);
31
32
33     void StepData::Init ()
34 {
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;
40 }
41
42     Handle(StepData_Protocol) StepData::Protocol ()
43 {
44   InitHandleVoid(StepData_Protocol,proto);// svv #2
45 //  UseHandle(StepData_Protocol,proto);
46   return proto;
47 }
48
49
50     void  StepData::AddHeaderProtocol (const Handle(StepData_Protocol)& header)
51 {
52   InitHandle(StepData_Protocol,theheader);
53   if (theheader.IsNull()) theheader = header;
54   else {
55     DeclareAndCast(StepData_FileProtocol,headmult,theheader);
56     if (headmult.IsNull()) {
57       headmult = new StepData_FileProtocol;
58       headmult->Add(theheader);
59     }
60     headmult->Add(header);
61     theheader = headmult;
62   }
63 }
64
65     Handle(StepData_Protocol) StepData::HeaderProtocol ()
66 {
67   UseHandle(StepData_Protocol,theheader);
68   return theheader;
69 }