The file is expected to have one element for every property. Each element has an element name (as per normal XML) which gives the property's name, and two attributes: "type", and "value".
No two elements in a given properties file may have the same name.
"type" must be one of the following values: bool int uint long ulong ulonglong double string
"value" must be parsable according to the specified "type".
<foo type=int value=3 /> <bar type=string value="antelope and deer" /> <baz type=string value=porcshe />
NOTES: The file's content is read only during the construction of this PropsFile object. Changs to the underlying file won't be apparent until a new PropsFile object is created.
CONCURRENCY: Concurrent invocations may be rampant.
|
Public Member Functions |
| PropsFile (string filepath) throw (AuroraException) |
| PropsFile (string filepath, string prefix, int argc, const char *argv[]) throw (AuroraException) |
virtual | ~PropsFile () |
map< string, string > | findPropsByPrefix (string prefix) const throw (AuroraException) |
bool | getBool (string propName) const throw (AuroraException) |
bool | isBoolPropDefined (string propName) const throw (AuroraException) |
bool | getBoolWithDefault (string propName, bool defaultValue) const |
int | getInt (string propName) const throw (AuroraException) |
bool | isIntPropDefined (string propName) const throw (AuroraException) |
int | getIntWithDefault (string propName, int defaultValue) const |
unsigned int | getUInt (string propName) const throw (AuroraException) |
bool | isUIntPropDefined (string propName) const throw (AuroraException) |
unsigned int | getUIntWithDefault (string propName, unsigned int defaultValue) const |
long | getLong (string propName) const throw (AuroraException) |
bool | isLongPropDefined (string propName) const throw (AuroraException) |
long | getLongWithDefault (string propName, long defaultValue) const |
unsigned long | getULong (string propName) const throw (AuroraException) |
bool | isULongPropDefined (string propName) const throw (AuroraException) |
unsigned long | getULongWithDefault (string propName, unsigned long defaultValue) const |
unsigned long long | getULongLong (string propName) const throw (AuroraException) |
bool | isULongLongPropDefined (string propName) const throw (AuroraException) |
unsigned long long | getULongLongWithDefault (string propName, unsigned long long defaultValue) const |
double | getDouble (string propName) const throw (AuroraException) |
bool | isDoubleDefined (string propName) const throw (AuroraException) |
double | getDoubleWithDefault (string propName, double defaultValue) const |
string | getString (string propName) const throw (AuroraException) |
bool | isStringPropDefined (string propName) const throw (AuroraException) |
string | getStringWithDefault (string propName, string defaultValue) const |