0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / STEPCAFControl / STEPCAFControl_Controller.cxx
CommitLineData
b311480e 1// Created on: 2000-10-05
2// Created by: Andrey BETENEV
973c2be1 3// Copyright (c) 2000-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16#include <STEPCAFControl_Controller.ixx>
17#include <STEPCAFControl_ActorWrite.hxx>
18#include <XSAlgo.hxx>
02a0b964 19#include <Interface_Static.hxx>
7fd59977 20
21//=======================================================================
22//function : STEPCAFControl_Controller
23//purpose :
24//=======================================================================
25
26STEPCAFControl_Controller::STEPCAFControl_Controller ()
27{
28 Handle(STEPCAFControl_ActorWrite) ActWrite = new STEPCAFControl_ActorWrite;
29 theAdaptorWrite = ActWrite;
30}
31
32//=======================================================================
33//function : Init
34//purpose :
35//=======================================================================
36
37Standard_Boolean STEPCAFControl_Controller::Init ()
38{
39 static Standard_Boolean inic = Standard_False;
40 if (inic) return Standard_True;
41 inic = Standard_True;
42 // self-registering
43 Handle(STEPCAFControl_Controller) STEPCTL = new STEPCAFControl_Controller;
02a0b964 44 // do XSAlgo::Init, cause it does not called before.
7fd59977 45 XSAlgo::Init();
46 // do something to avoid warnings...
47 STEPCTL->AutoRecord();
02a0b964 48
49 //-----------------------------------------------------------
50 // Few variables for advanced control of translation process
51 //-----------------------------------------------------------
52
53 // Indicates whether to write sub-shape names to 'Name' attributes of
54 // STEP Representation Items
55 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", 'e', "");
56 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "enum 0");
57 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval Off"); // 0
58 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval On"); // 1
59 Interface_Static::SetIVal("write.stepcaf.subshapes.name", 0); // Disabled by default
60
61 // Indicates whether to read sub-shape names from 'Name' attributes of
62 // STEP Representation Items
63 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", 'e', "");
64 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "enum 0");
65 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
66 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On"); // 1
67 Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
68
7fd59977 69 return Standard_True;
70}