Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_EnvVariables.hpp
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
15namespace Teuchos {
16
17template <typename T>
18T getEnvironmentVariable(const std::string_view environmentVariableName,
19 const T defaultValue);
20
21bool idempotentlyGetNamedEnvironmentVariableAsBool(
22 const char name[], bool &initialized, const char environmentVariableName[],
23 const bool defaultValue);
24
36template <typename T>
38 T &value, bool &initialized, const std::string_view environmentVariableName,
39 const T defaultValue);
40
41} // namespace Teuchos
42
43#endif
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
T idempotentlyGetEnvironmentVariable(T &value, bool &initialized, const std::string_view environmentVariableName, const T defaultValue)
Read a variable from the environment. Example usage: