Public Member Functions | |
Properties () | |
Create new instance. | |
~Properties () | |
Destructor. | |
void | load (InputStreamPtr inStream) |
Reads a property list (key and element pairs) from the input stream. | |
LogString | setProperty (const LogString &key, const LogString &value) |
Calls Properties::put. | |
LogString | put (const LogString &key, const LogString &value) |
Puts a property value into the collection. | |
LogString | getProperty (const LogString &key) const |
Calls Properties::get. | |
LogString | get (const LogString &key) const |
Gets a property value. | |
std::vector< LogString > | propertyNames () const |
Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list. |
|
Create new instance.
|
|
Destructor.
|
|
Gets a property value.
|
|
Calls Properties::get.
|
|
Reads a property list (key and element pairs) from the input stream. The stream is assumed to be using the ISO 8859-1 character encoding.
Every property occupies one line of the input stream. Each line is terminated by a line terminator (
A line that contains only whitespace or whose first non-whitespace character is an ASCII
Every line other than a blank line or a comment line describes one property to be added to the table (except that if a line ends with \, then the following line, if it exists, is treated as a continuation line, as described below). The key consists of all the characters in the line starting with the first non-whitespace character and up to, but not including, the first ASCII As an example, each of the following four lines specifies the key "Truth" and the associated element value "Beauty":
Truth = Beauty Truth:Beauty Truth :Beauty As another example, the following three lines specify a single property: fruits apple, banana, pear, \ cantaloupe, watermelon, \ kiwi, mangoThe key is "<code>fruits</code>" and the associated element is: "apple, banana, pear, cantaloupe, watermelon, kiwi, mango"Note that a space appears before each \ so that a space will appear after each comma in the final result; the \, line terminator, and leading whitespace on the continuation line are merely discarded and are not replaced by one or more other characters. As a third example, the line: cheesesspecifies that the key is "<code>cheeses</code>" and the associated element is the empty string.
|
|
Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list.
|
|
Puts a property value into the collection.
|
|
Calls Properties::put.
|