|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_CONF_ENVIRONMENT_H
11 #define YARP_CONF_ENVIRONMENT_H
20 namespace environment {
34 if (found !=
nullptr) {
35 *found = (result !=
nullptr);
37 if (result ==
nullptr) {
40 return std::string(result);
54 _putenv_s(key.c_str(), val.c_str());
56 ::setenv(key.c_str(), val.c_str(), 1);
70 _putenv_s(key.c_str(),
"");
72 ::unsetenv(key.c_str());
81 #endif // YARP_CONF_ENVIRONMENT_H
std::string getEnvironment(const char *key, bool *found=nullptr)
Read a variable from the environment.
const char * getenv(const char *var)
Portable wrapper for the getenv() function.
void unsetEnvironment(const std::string &key)
Remove an environment variable.
The main, catch-all namespace for YARP.
void setEnvironment(const std::string &key, const std::string &val)
Set or change an environment variable.