ConfigDictionary Class Reference#include <Config.h>
Inheritance diagram for ConfigDictionary:
[legend]List of all members.
Detailed Description
a subclass of plist::Dictionary which adds support for filtering settings by robot model, each configuration section is based on this
As a slight extension to standard plists, you can specify model-specific settings by prepending a key with: Model:MODEL_PATTERN:KEY_NAME For example, to use different 'thresh' settings on the ERS-2xx series vs. the ERS-7 model, you would use the keys:
- Model:ERS-2*:thresh
- Model:ERS-7:thresh You can filter several items as a group by leaving off the second ':' and name, and providing a dictionary as the value. If the model matches, all entries from the dictionary are imported into the parent dictionary.
Definition at line 35 of file Config.h.
|
Public Member Functions |
|
| ConfigDictionary () |
Protected Member Functions |
|
virtual bool | loadXMLNode (const std::string &key, xmlNode *val, const std::string &comment) |
| | called with each node being loaded so subclass can handle appropriately
|
|
virtual bool | saveOverXMLNode (xmlNode *k, xmlNode *val, const std::string &key, std::string comment, const std::string &indentStr, std::set< std::string > &seen) const |
| | called with each node being saved so subclass can handle appropriately, return true if successful and reset key if changed
|
Static Protected Member Functions |
|
static bool | matchNoCase (const std::string &model, const std::string &pattern) |
| | returns true if pattern matches model - pattern may have up to 1 '*', case insensitive
|
|
static void | initCurModel () |
| | function to initialize curModel
|
Static Protected Attributes |
|
static const std::string | msPrefix = "Model" |
| | the prefix indicating a model-specific key
|
|
static const std::string | msSep = ":" |
| | the separator string which splits the key into the prefix, model pattern, and (optionally) a single key name
|
|
static std::string | curModel |
| | will be set to the model identifier of the currently running hardware
|
The documentation for this class was generated from the following files:
|