5 #ifndef _TPETRA_DETAILS_ENVIRONMENT_HPP_ 6 #define _TPETRA_DETAILS_ENVIRONMENT_HPP_ 11 class DefaultEnvironmentVariables {
19 static const std::list<std::string> getDefaults() {
20 const std::list<std::string> defaultVariables {
"TPETRA_DEBUG",
22 return defaultVariables;
30 static Environment& getInstance() {
33 static Environment theInstance_;
40 std::string variableValue;
41 std::list<std::string>::iterator variableName;
42 std::list<std::string> std_vars(DefaultEnvironmentVariables::getDefaults());
43 for (variableName = std_vars.begin();
44 variableName != std_vars.end();
47 variableValue = getValue(*variableName);
50 std::map<std::string, const char *> environCache_;
51 void cacheVariable(
const std::string& variableName,
52 const char* variableValue);
62 Environment(Environment
const&) =
delete;
63 void operator=(Environment
const&) =
delete;
70 bool variableIsCached(
const std::string& variableName);
80 bool variableExists(
const std::string& variableName);
95 bool getBooleanValue(
const std::string& variableName,
96 const std::string& defaultValue=
"");
111 std::string getValue(
const std::string& variableName,
112 const std::string& defaultValue=
"");
132 #endif // _TPETRA_DETAILS_ENVIRONMENT_HPP_ Namespace Tpetra contains the class and methods constituting the Tpetra library.
Implementation details of Tpetra.