0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[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
17 #include <Interface_Macros.hxx>
18 #include <Interface_Static.hxx>
19 #include <Interface_Statics.hxx>
20 #include <StepData.hxx>
21 #include <StepData_DefaultGeneral.hxx>
22 #include <StepData_FileProtocol.hxx>
23 #include <StepData_Protocol.hxx>
24
25 StaticHandle(StepData_Protocol,proto);
26 //svv #2: StaticHandle(StepData_DefaultGeneral,stmod);
27
28 StaticHandleA(StepData_Protocol,theheader);
29
30
31     void StepData::Init ()
32 {
33 //  InitHandleVoid(StepData_Protocol,proto);
34 //  InitHandleVoid(StepData_DefaultGeneral,stmod);
35 //:S4136  Interface_Static::Init("step","step.readaccept.void",'i',"1");
36 //  if (proto.IsNull()) proto = new StepData_Protocol;
37 //  if (stmod.IsNull()) stmod = new StepData_DefaultGeneral;
38 }
39
40     Handle(StepData_Protocol) StepData::Protocol ()
41 {
42   InitHandleVoid(StepData_Protocol,proto);// svv #2
43 //  UseHandle(StepData_Protocol,proto);
44   return proto;
45 }
46
47
48     void  StepData::AddHeaderProtocol (const Handle(StepData_Protocol)& header)
49 {
50   InitHandle(StepData_Protocol,theheader);
51   if (theheader.IsNull()) theheader = header;
52   else {
53     DeclareAndCast(StepData_FileProtocol,headmult,theheader);
54     if (headmult.IsNull()) {
55       headmult = new StepData_FileProtocol;
56       headmult->Add(theheader);
57     }
58     headmult->Add(header);
59     theheader = headmult;
60   }
61 }
62
63     Handle(StepData_Protocol) StepData::HeaderProtocol ()
64 {
65   UseHandle(StepData_Protocol,theheader);
66   return theheader;
67 }