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) |
uima::util::EnvironmentVariableQueryOnly::EnvironmentVariableQueryOnly | ( | const char * | cpszVar | ) | [inline] |
instantiate a new environment variable handler
References UIMA_ERR_ENGINE_OUT_OF_MEMORY, UIMA_EXC_THROW_NEW, and uima::ErrorInfo::unrecoverable.
uima::util::EnvironmentVariableQueryOnly::~EnvironmentVariableQueryOnly | ( | void | ) | [inline] |
bool uima::util::EnvironmentVariableQueryOnly::hasValue | ( | void | ) | const [inline] |
return TRUE if the environment variable has a value else FALSE
Referenced by uima::util::Location::Location().
const char* uima::util::EnvironmentVariableQueryOnly::getValue | ( | void | ) | const [inline] |
return the value for the environment variable or NULL if it does not have a value
Referenced by uima::util::DllProcLoaderFile::DllProcLoaderFile(), and uima::util::Location::Location().
bool uima::util::EnvironmentVariableQueryOnly::hasValueEnabled | ( | void | ) | const [inline] |
return TRUE if the value for the environment variable is "ON" or "YES" or "TRUE" or "1"