1 // Created on: 2000-10-05
2 // Created by: Andrey BETENEV
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
17 #include <Interface_Static.hxx>
18 #include <Standard_Type.hxx>
19 #include <STEPCAFControl_ActorWrite.hxx>
20 #include <STEPCAFControl_Controller.hxx>
23 IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Controller,STEPControl_Controller)
25 //=======================================================================
26 //function : STEPCAFControl_Controller
28 //=======================================================================
29 STEPCAFControl_Controller::STEPCAFControl_Controller ()
31 Handle(STEPCAFControl_ActorWrite) ActWrite = new STEPCAFControl_ActorWrite;
32 myAdaptorWrite = ActWrite;
35 //=======================================================================
38 //=======================================================================
40 Standard_Boolean STEPCAFControl_Controller::Init ()
42 static Standard_Boolean inic = Standard_False;
43 if (inic) return Standard_True;
46 Handle(STEPCAFControl_Controller) STEPCTL = new STEPCAFControl_Controller;
47 // do XSAlgo::Init, cause it does not called before.
49 // do something to avoid warnings...
50 STEPCTL->AutoRecord();
52 //-----------------------------------------------------------
53 // Few variables for advanced control of translation process
54 //-----------------------------------------------------------
56 // Indicates whether to write sub-shape names to 'Name' attributes of
57 // STEP Representation Items
58 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", 'e', "");
59 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "enum 0");
60 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval Off"); // 0
61 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval On"); // 1
62 Interface_Static::SetIVal("write.stepcaf.subshapes.name", 0); // Disabled by default
64 // Indicates whether to read sub-shape names from 'Name' attributes of
65 // STEP Representation Items
66 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", 'e', "");
67 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "enum 0");
68 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
69 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On"); // 1
70 Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
72 // STEP file encoding for names translation
73 // Note: the numbers should be consistent with Resource_FormatType enumeration
74 Interface_Static::Init ("step", "read.stepcaf.codepage", 'e', "");
75 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "enum 0");
76 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval SJIS"); // Resource_FormatType_SJIS
77 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval EUC"); // Resource_FormatType_EUC
78 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval ANSI"); // Resource_FormatType_ANSI
79 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval GB"); // Resource_FormatType_GB
80 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval UTF8"); // Resource_FormatType_UTF8
81 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval SystemLocale"); // Resource_FormatType_SystemLocale
82 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1250"); // Resource_FormatType_CP1250
83 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1251"); // Resource_FormatType_CP1251
84 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1252"); // Resource_FormatType_CP1252
85 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1253"); // Resource_FormatType_CP1253
86 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1254"); // Resource_FormatType_CP1254
87 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1255"); // Resource_FormatType_CP1255
88 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1256"); // Resource_FormatType_CP1256
89 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1257"); // Resource_FormatType_CP1257
90 Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval CP1258"); // Resource_FormatType_CP1258
91 Interface_Static::SetCVal ("read.stepcaf.codepage", "UTF8");