0024186: Eliminate remaining compiler warnings in MSVC++ 2010 64 bit with warning...
[occt.git] / src / StepData / StepData.cxx
1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
2 //
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
7 //
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10 //
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
17
18 //    abv 09.04.99 S4136: eliminate parameter step.readaccept.void
19 //    svv #2    23.02.00: porting on SIL
20 #include <StepData.ixx>
21 # include <StepData_Protocol.hxx>
22 # include <StepData_DefaultGeneral.hxx>
23 # include <StepData_FileProtocol.hxx>
24 #include <Interface_Static.hxx>
25
26 #include <Interface_Statics.hxx>
27 #include <Interface_Macros.hxx>
28
29
30
31 StaticHandle(StepData_Protocol,proto);
32 //svv #2: StaticHandle(StepData_DefaultGeneral,stmod);
33
34 StaticHandleA(StepData_Protocol,theheader);
35
36
37     void StepData::Init ()
38 {
39 //  InitHandleVoid(StepData_Protocol,proto);
40 //  InitHandleVoid(StepData_DefaultGeneral,stmod);
41 //:S4136  Interface_Static::Init("step","step.readaccept.void",'i',"1");
42 //  if (proto.IsNull()) proto = new StepData_Protocol;
43 //  if (stmod.IsNull()) stmod = new StepData_DefaultGeneral;
44 }
45
46     Handle(StepData_Protocol) StepData::Protocol ()
47 {
48   InitHandleVoid(StepData_Protocol,proto);// svv #2
49 //  UseHandle(StepData_Protocol,proto);
50   return proto;
51 }
52
53
54     void  StepData::AddHeaderProtocol (const Handle(StepData_Protocol)& header)
55 {
56   InitHandle(StepData_Protocol,theheader);
57   if (theheader.IsNull()) theheader = header;
58   else {
59     DeclareAndCast(StepData_FileProtocol,headmult,theheader);
60     if (headmult.IsNull()) {
61       headmult = new StepData_FileProtocol;
62       headmult->Add(theheader);
63     }
64     headmult->Add(header);
65     theheader = headmult;
66   }
67 }
68
69     Handle(StepData_Protocol) StepData::HeaderProtocol ()
70 {
71   UseHandle(StepData_Protocol,theheader);
72   return theheader;
73 }