YARP
Yet Another Robot Platform
yarp::conf::environment Namespace Reference

Functions

std::string getEnvironment (const char *key, bool *found=nullptr)
 Read a variable from the environment. More...
 
void setEnvironment (const std::string &key, const std::string &val)
 Set or change an environment variable. More...
 
void unsetEnvironment (const std::string &key)
 Remove an environment variable. More...
 

Function Documentation

◆ getEnvironment()

std::string yarp::conf::environment::getEnvironment ( const char *  key,
bool *  found = nullptr 
)
inline

Read a variable from the environment.

Parameters
keythe variable to read
foundan optional variable to set to true iff variable is found
Returns
the value of the environment variable, or "" if not found
Since
YARP 3.4

Definition at line 31 of file environment.h.

◆ setEnvironment()

void yarp::conf::environment::setEnvironment ( const std::string &  key,
const std::string &  val 
)
inline

Set or change an environment variable.

Parameters
keythe variable to set or change
valthe target value
Since
YARP 3.4

Definition at line 51 of file environment.h.

◆ unsetEnvironment()

void yarp::conf::environment::unsetEnvironment ( const std::string &  key)
inline

Remove an environment variable.

Parameters
keythe variable to remove
Since
YARP 3.4

Definition at line 67 of file environment.h.