|
libdrmconf 0.14.1
A library to program DMR radios.
|
Parse context for config objects. More...
#include <configobject.hh>
Public Member Functions | |
| Context () | |
| Empty constructor. | |
| virtual | ~Context () |
| Destructor. | |
| const QString & | version () const |
| Returns the read version string. | |
| void | setVersion (const QString &ver) |
| Sets the version string. | |
| virtual bool | contains (ConfigObject *obj) const |
Returns true, if the context contains the given object. | |
| virtual bool | contains (const QString &id) const |
Returns true, if the context contains the given ID. | |
| virtual QString | getId (ConfigObject *obj) const |
| Returns ID of the given object. | |
| virtual ConfigObject * | getObj (const QString &id) const |
| Returns the object for the given ID. | |
| virtual bool | add (const QString &id, ConfigObject *) |
| Associates the given object with the given ID. | |
Protected Attributes | |
| QString | _version |
| The version string. | |
| QHash< QString, ConfigObject * > | _objects |
| ID->OBJ look-up table. | |
| QHash< ConfigObject *, QString > | _ids |
| OBJ->ID look-up table. | |
Static Protected Attributes | |
| static QHash< QString, QList< QPair< QString, QVariant > > > | _tags |
| Set of tag-value pairs for all properties. | |
Parse context for config objects.
During serialization, each config object gets an ID assigned. When reading the config, these IDs must be matched back to the corresponding objects. This is done using this context.
|
staticprotected |
Set of tag-value pairs for all properties.