1dc5ea6b535c79bf7bc7c7b34874bc78a250d640
[occt.git] / src / Dynamic / Dynamic_BooleanParameter.cxx
1 // Created on: 1994-01-24
2 // Created by: Gilles DEBARBOUILLE
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 // Historique :
18 // CRD : 03/07/97 : Portage Windows NT.
19
20
21 #include <Dynamic_BooleanParameter.ixx>
22 #ifdef HAVE_CONFIG_H
23 # include <config.h>
24 #endif
25 #ifdef HAVE_STRINGS_H
26 # include <strings.h>
27 #endif
28 #ifdef WNT
29 //#define strcasecmp _stricoll
30 #include <stdio.h>
31 #endif
32
33 //=======================================================================
34 //function : Dynamic_BooleanParameter
35 //purpose  : 
36 //=======================================================================
37
38 Dynamic_BooleanParameter::Dynamic_BooleanParameter
39   (const Standard_CString aparameter)
40      : Dynamic_Parameter(aparameter)
41 {}
42
43 //=======================================================================
44 //function : Dynamic_BooleanParameter
45 //purpose  : 
46 //=======================================================================
47
48 Dynamic_BooleanParameter::Dynamic_BooleanParameter
49   (const Standard_CString aparameter,
50    const Standard_Boolean avalue)
51      : Dynamic_Parameter(aparameter)
52 {
53   thevalue = avalue;
54 }
55
56 //=======================================================================
57 //function : Dynamic_BooleanParameter
58 //purpose  : 
59 //=======================================================================
60
61 Dynamic_BooleanParameter::Dynamic_BooleanParameter
62   (const Standard_CString aparameter,
63    const Standard_CString avalue)
64      : Dynamic_Parameter(aparameter)
65 {
66   if     (!strcasecmp(avalue,"Standard_True")) thevalue = Standard_True;
67   else if(!strcasecmp(avalue,"Standard_False")) thevalue = Standard_False;
68   else cout<<"BooleanParameter ("<<avalue<<") n'existe pas"<<endl;
69 }
70
71 //=======================================================================
72 //function : Value
73 //purpose  : 
74 //=======================================================================
75
76 Standard_Boolean Dynamic_BooleanParameter::Value() const
77 {
78   return thevalue;
79 }
80
81 //=======================================================================
82 //function : Value
83 //purpose  : 
84 //=======================================================================
85
86 void Dynamic_BooleanParameter::Value(const Standard_Boolean avalue) 
87 {
88   thevalue = avalue;
89 }
90
91 //=======================================================================
92 //function : Dump
93 //purpose  : 
94 //=======================================================================
95
96 void Dynamic_BooleanParameter::Dump(Standard_OStream& astream) const
97 {
98   Dynamic_Parameter::Dump(astream);
99   astream<<" "<<thevalue;
100 }