DUNE: Uniform Navigational Environment  2019.02.0
DUNE::System::Environment Class Reference

Static Public Member Functions

static bool get (std::string var, std::string &value)
 
template<typename T >
static bool get (std::string var, T &value)
 
static void set (std::string var, std::string value)
 
template<typename T >
static void set (std::string var, T value)
 
static void unset (std::string var)
 

Member Function Documentation

bool DUNE::System::Environment::get ( std::string  var,
std::string &  value 
)
static

Get an environment variable.

Note: call may not be thread-safe on some OSes.

Parameters
[in]varthe name of the environment variable.
[out]valueset to the value of environment variable, if the call is successful.
Returns
true if successful, false otherwise.

Referenced by DUNE::Tasks::Context::Context().

template<typename T >
static bool DUNE::System::Environment::get ( std::string  var,
T &  value 
)
inlinestatic

Get an environment variable, template version.

Parameters
[in]varthe name of the environment variable.
[out]valueset to the value of environment variable, if the call is successful.
Returns
true if successful, false otherwise.
void DUNE::System::Environment::set ( std::string  var,
std::string  value 
)
static

Set an environment variable.

Note: call may not be thread-safe on some OSes.

Parameters
[in]varthe name of the environment variable.
[in]valuenew value for the environment variable.

Referenced by set().

template<typename T >
static void DUNE::System::Environment::set ( std::string  var,
value 
)
inlinestatic

Set an environment variable, template version.

Parameters
[in]varthe name of the environment variable.
[in]valuenew value for the environment variable.

References set().

void DUNE::System::Environment::unset ( std::string  var)
static

Unset an environment variable.

Note: call may not be thread-safe on some OSes.

Parameters
[in]varthe name of the environment variable.
Collaboration diagram for DUNE::System::Environment:
Collaboration graph