0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation
[occt.git] / src / Interface / Interface_StaticStandards.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 #include <Interface_Static.hxx>
15
16 #include <Message_MsgFile.hxx>
17 #include <TCollection_ExtendedString.hxx>
18 #include <Precision.hxx>
19
20 #include <stdio.h>
21
22 #include "../XSMessage/XSMessage_XSTEP_us.pxx"
23
24 static int THE_Interface_Static_deja = 0;
25
26 void  Interface_Static::Standards ()
27 {
28   if (THE_Interface_Static_deja)
29   {
30     return;
31   }
32
33   THE_Interface_Static_deja = 1;
34
35 //   read precision
36   //#74 rln 10.03.99 S4135: new values and default value
37   Interface_Static::Init ("XSTEP","read.precision.mode",'e',"");
38   Interface_Static::Init ("XSTEP","read.precision.mode",'&',"ematch 0");
39   Interface_Static::Init ("XSTEP","read.precision.mode",'&',"eval File");
40   Interface_Static::Init ("XSTEP","read.precision.mode",'&',"eval User");
41   Interface_Static::SetIVal ("read.precision.mode",0);
42
43   Interface_Static::Init ("XSTEP","read.precision.val",'r',"1.e-03");
44
45   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'e',"");
46   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"ematch 0");
47   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"eval Preferred");
48   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"eval Forced");
49   Interface_Static::SetIVal ("read.maxprecision.mode",0);
50
51   Interface_Static::Init ("XSTEP","read.maxprecision.val",'r',"1.");
52
53 //   encode regularity
54 //  negatif ou nul : ne rien faire. positif : on y va
55   Interface_Static::Init ("XSTEP","read.encoderegularity.angle",'r',"0.01");
56
57 //   compute surface curves
58 //  0 : par defaut. 2 : ne garder que le 2D. 3 : ne garder que le 3D
59   //gka S4054
60   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", 'e',"");
61   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"ematch -3");
62   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 3DUse_Forced");
63   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 2DUse_Forced");
64   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval ?");
65   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval Default");
66   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval ?");
67   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 2DUse_Preferred");
68   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 3DUse_Preferred");
69   Interface_Static::SetIVal ("read.surfacecurve.mode",0);
70
71 //   write precision
72   Interface_Static::Init ("XSTEP","write.precision.mode",'e',"");
73   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"ematch -1");
74   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Min");
75   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Average");
76   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Max");
77   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval User");
78   Interface_Static::SetIVal ("write.precision.mode",0);
79
80   Interface_Static::Init ("XSTEP","write.precision.val",'r',"1.e-03");
81
82   // Write surface curves
83   // 0: write (defaut), 1: do not write, 2: write except for analytical surfaces
84   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", 'e',"");
85   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"ematch 0");
86   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"eval Off");
87   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"eval On");
88 //  Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"eval NoAnalytic");
89   Interface_Static::SetIVal ("write.surfacecurve.mode",1);
90
91 //  lastpreci : pour recuperer la derniere valeur codee (cf XSControl)
92 //    (0 pour dire : pas codee)
93 //:S4136  Interface_Static::Init("std"    ,"lastpreci", 'r',"0.");
94
95   // load messages if needed
96   if (!Message_MsgFile::HasMsg ("XSTEP_1"))
97   {
98     if (!Message_MsgFile::LoadFromEnv ("CSF_XSMessage", "XSTEP"))
99     {
100       Message_MsgFile::LoadFromString (XSMessage_XSTEP_us, sizeof(XSMessage_XSTEP_us) - 1);
101     }
102     if (!Message_MsgFile::HasMsg ("XSTEP_1"))
103     {
104       throw Standard_ProgramError("Critical Error - message resources for Interface_Static are invalid or undefined!");
105     }
106   }
107 }