EnvironmentVariableQueryOnly
is used to manage environment variables which can be queried only.
The value for this variable cannot be changed.
foo(void) { EnvironmentVariableQueryOnly var("TMP"); if(var.hasValue()) cout << "TMP directory: " << var.getValue() << endl; else cout << "No TMP directory defined" << endl; }
Public Member Functions | |
bool | hasValue (void) const |
return TRUE if the environment variable has a value else FALSE | |
const char * | getValue (void) const |
return the value for the environment variable or NULL if it does not have a value | |
bool | hasValueEnabled (void) const |
return TRUE if the value for the environment variable is "ON" or "YES" or "TRUE" or "1" | |
Constructors | |
EnvironmentVariableQueryOnly (const char *cpszVar) | |
instantiate a new environment variable handler | |
~EnvironmentVariableQueryOnly (void) |
|
instantiate a new environment variable handler
|
|
|
|
return TRUE if the environment variable has a value else FALSE
|
|
return the value for the environment variable or NULL if it does not have a value
|
|
return TRUE if the value for the environment variable is "ON" or "YES" or "TRUE" or "1"
|