|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
An environment variable. More...
#include <environment_variable.hpp>
Public Member Functions | |
Constructors | |
| EnvVariable (std::string const &var_name) | |
| Construct from a string. More... | |
| EnvVariable (std::string &&var_name) | |
| Construct from a temporary string. More... | |
Queries | |
| bool | exists () const |
| Test if the variable exists in the environment. More... | |
Accessors | |
| std::string const & | name () const noexcept |
| Get the name of the environment variable. More... | |
| std::string | raw_value () const |
| Get the string value of the environment variable. More... | |
| template<typename T > | |
| T | value () const |
| Get the value of the environment variable as a certain type. More... | |
Private Attributes | |
| std::string | name_ |
| The name of the variable. More... | |
An environment variable.
Values are acquired lazily. The only maintained state is the name.
Definition at line 49 of file environment_variable.hpp.
|
inline |
Construct from a string.
Definition at line 98 of file environment_variable.hpp.
|
inline |
Construct from a temporary string.
Definition at line 103 of file environment_variable.hpp.
|
inline |
Test if the variable exists in the environment.
Existence means set to a nonempty string.
Definition at line 108 of file environment_variable.hpp.
|
inlinenoexcept |
Get the name of the environment variable.
Definition at line 114 of file environment_variable.hpp.
|
inline |
Get the string value of the environment variable.
Definition at line 120 of file environment_variable.hpp.
| T lbann::utils::EnvVariable< AccessPolicy >::value | ( | ) | const |
Get the value of the environment variable as a certain type.
Definition at line 128 of file environment_variable.hpp.
|
private |
The name of the variable.
Definition at line 89 of file environment_variable.hpp.