|
Public Member Functions |
| | Parameters () |
| | Create.
|
| | Parameters (const Parameters &other) |
| | Parameters (parameter_value *value) |
| | Parameters (const std::string &path, parameter_value *value) |
| | ~Parameters () |
| | Clean up.
|
| | operator double () |
| | the value of the parameter as a double
|
| | operator bool () |
| | operator int () |
| | operator INT64 () |
| | operator std::string () |
| | the value of the parameter as a string
|
| const Parameters & | operator= (const Parameters &other) |
| Parameters | get (size_t index) |
| Parameters | get (const std::string &name) |
| Parameters | get (const char *name) |
| bool | get (const std::string &name, bool def) |
| int | get (const std::string &name, int def) |
| double | get (const std::string &name, double def) |
| INT64 | get (const std::string &name, INT64 def) |
| std::string | get (const std::string &name, const char *def) |
| std::string | get (const std::string &name, const std::string &def) |
| Parameters | operator[] (size_t index) |
| Parameters | operator[] (const std::string &path) |
| Parameters | operator[] (const char *path) |
| Parameters | append (const std::string &path) |
| void | remove (const std::string &path) |
| void | set (const std::string &name, bool value) |
| void | set (const std::string &name, const char *value) |
| void | set (const std::string &name, const std::string &value) |
| void | set (const std::string &name, int value) |
| void | set (const std::string &name, UINT64 value) |
| void | set (const std::string &name, INT64 value) |
| void | set (const std::string &name, double value) |
| void | set (const std::string &value) |
| void | clear () |
| | Clear the parameter tree.
|
| size_t | size () |
| | the size of the object.
|
| bool | exists (size_t index) |
| bool | exists (const std::string &name) |
| indri::xml::XMLNode * | toXML () |
| void | load (const std::string &text) |
| void | loadFile (const std::string &filename) |
| void | loadCommandLine (int argc, char **argv) |
| void | write (std::string &text) |
| void | writeFile (const std::string &filename) |
Static Public Member Functions |
| Parameters & | instance () |
| | Return the singleton instance of the Parameters class.
|
Protected Member Functions |
| parameter_value * | _getRoot () |
| parameter_value * | _getPath (const std::string &path, Parameters::parameter_value *last, int offset=0) |
| parameter_value * | _createPath (const std::string &path) |
| void | _parseNextSegment (std::string &segment, int &arrayIndex, int &endOffset, const std::string &path, int beginOffset) |
| parameter_value * | _getSegment (const std::string &segment, int arrayIndex, Parameters::parameter_value *from) |
| void | _loadXML (class indri::xml::XMLNode *node) |
| void | _fillXML (class indri::xml::XMLNode *node) |
| INT64 | _multiplier (const std::string &value) |
| bool | _isBoolean (const std::string &value) |
| bool | _asBoolean (const std::string &value) |
Protected Attributes |
| parameter_value * | _collection |
| bool | _owned |