Open Babel  3.0
locale.h
Go to the documentation of this file.
1 /**********************************************************************
2 locale.h - Handle internal numeric locale issues -- parse data in "C"
3 
4 Copyright (C) 2008 by Geoffrey R. Hutchison
5 
6 This file is part of the Open Babel project.
7 For more information, see <http://openbabel.org/>
8 
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation version 2 of the License.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 ***********************************************************************/
18 
19 #ifndef OB_LOCALE_H
20 #define OB_LOCALE_H
21 
22 #include <locale>
23 #include <openbabel/babelconfig.h>
24 
25 #ifndef OBERROR
26 #define OBERROR
27 #endif
28 
29 namespace OpenBabel
30 {
31  class OBLocalePrivate;
32 
33  // more detailed descriptions and documentation in locale.cpp
35  class OBERROR OBLocale {
36  public:
37 
38  OBLocale();
39  ~OBLocale();
40 
41  void SetLocale();
42  void RestoreLocale();
43 
44  protected:
45  OBLocalePrivate* d;
46  };
47 
48  //global definitions
50  OBERROR extern OBLocale obLocale;
51 
52 } // namespace OpenBabel
53 #endif // OB_LOCALE_H
54 
OBLocale obLocale
Global OBLocale for setting and restoring locale information.
Definition: locale.cpp:134
OBLocalePrivate * d
Definition: locale.h:45
Handle the locale for numeric data parsing.
Definition: locale.h:35
Global namespace for all Open Babel code.
Definition: alias.h:22