Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_EnvVariables.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Teuchos: Common Tools Package
4 //
5 // Copyright 2004 NTESS and the Teuchos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef TEUCHOS_ENVVARIABLES_HPP
11 #define TEUCHOS_ENVVARIABLES_HPP
12 
13 #include <string_view>
14 
15 namespace Teuchos {
16 
18  const char name[], bool &initialized, const char environmentVariableName[],
19  const bool defaultValue);
20 
32 template <typename T>
34  T &value, bool &initialized, const std::string_view environmentVariableName,
35  const T defaultValue);
36 
37 } // namespace Teuchos
38 
39 #endif
bool idempotentlyGetNamedEnvironmentVariableAsBool(const char name[], bool &initialized, const char environmentVariableName[], const bool defaultValue)
T idempotentlyGetEnvironmentVariable(T &value, bool &initialized, const std::string_view environmentVariableName, const T defaultValue)
Read a variable from the environment. Example usage: