#include <envUtil.h>
Public Member Functions | |
envUtil () | |
default constructor More... | |
envUtil (const char *envName, const char *defaultValue="") | |
envUtil (const char *envName, const std::string &defaultValue) | |
envUtil (const std::string &defaultValue) | |
constructor from the default value only More... | |
const std::string & | getEnv () const |
return the value More... | |
const std::string & | getEnv (const char *envName, const char *defaultValue="") |
acts as the constructor with the same signature More... | |
const std::string & | name () const |
operator const char * () const | |
cast in char * (for old interface and c-like interface) More... | |
envUtil & | operator= (const std::string &s) |
assignement operator (change the value...) More... | |
void | setEnv () |
void | setEnv (const std::string &nval) |
Protected Attributes | |
std::string | env_ |
std::string | envName_ |
envUtil::envUtil | ( | const char * | envName, |
const char * | defaultValue = "" |
||
) |
constructor by the evironmental variable name and its default value (used if the environmental variable is not set)
Definition at line 5 of file envUtil.cc.
References env_.
envUtil::envUtil | ( | const char * | envName, |
const std::string & | defaultValue | ||
) |
constructor by the evironmental variable name and its default value (used if the environmental variable is not set)
Definition at line 12 of file envUtil.cc.
References env_.
|
inline |
|
inline |
return the value
Definition at line 49 of file envUtil.h.
References env_.
Referenced by operator<<().
const std::string & envUtil::getEnv | ( | const char * | envName, |
const char * | defaultValue = "" |
||
) |
acts as the constructor with the same signature
Definition at line 34 of file envUtil.cc.
References env_, and envName_.
|
inline |
|
inline |
|
inline |
assignement operator (change the value...)
Definition at line 41 of file envUtil.h.
References env_, and alignCSCRings::s.
void envUtil::setEnv | ( | ) |
Definition at line 20 of file envUtil.cc.
References env_, and envName_.
Referenced by operator>>(), and setEnv().
void envUtil::setEnv | ( | const std::string & | nval | ) |
|
protected |
Definition at line 65 of file envUtil.h.
Referenced by envUtil(), getEnv(), operator const char *(), operator=(), and setEnv().