RDKit
Open-source cheminformatics and machine learning.
Main Page
Namespaces
Classes
Files
File List
File Members
LocaleSwitcher.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2012 Greg Landrum
3
//
4
// @@ All Rights Reserved @@
5
// This file is part of the RDKit.
6
// The contents are covered by the terms of the BSD license
7
// which is included in the file license.txt, found at the root
8
// of the RDKit source tree.
9
//
10
//
11
#ifndef _RD_LOCALESWITCHER_H
12
#define _RD_LOCALESWITCHER_H
13
14
#include <clocale>
15
16
namespace
RDKit
{
17
namespace
Utils {
18
// allows an RAII-like approach to ensuring the locale is temporarily "C"
19
// instead of whatever we started in.
20
class
LocaleSwitcher
{
21
public
:
22
LocaleSwitcher
() {
23
std::setlocale(LC_ALL,
"C"
);
24
}
25
~LocaleSwitcher
() {
26
std::setlocale(LC_ALL,
""
);
27
}
28
};
29
}
30
}
31
32
#endif
RDKit::Utils::LocaleSwitcher
Definition:
LocaleSwitcher.h:20
RDKit
Includes a bunch of functionality for handling Atom and Bond queries.
Definition:
Atom.h:28
RDKit::Utils::LocaleSwitcher::~LocaleSwitcher
~LocaleSwitcher()
Definition:
LocaleSwitcher.h:25
RDKit::Utils::LocaleSwitcher::LocaleSwitcher
LocaleSwitcher()
Definition:
LocaleSwitcher.h:22
RDGeneral
LocaleSwitcher.h
Generated on Sat Apr 23 2016 18:49:15 for RDKit by
1.8.11