libdrmconf 0.14.1
A library to program DMR radios.
Loading...
Searching...
No Matches
ConfigItem::Context Class Reference

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 ConfigObjectgetObj (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.

Static Public Member Functions

static bool tagIsSet (const QString &className, const QString &property, const QString &tag)
 Returns true if the property of the class has the specified tag associated.
static bool hasTag (const QString &className, const QString &property, QVariant value)
 Returns true if the property of the class has the specified object as a tag associated.
static QVariant tagGetValue (const QString &className, const QString &property, const QString &tag)
 Returns the object associated with the tag for the property of the class.
static QString getTag (const QString &className, const QString &property, QVariant value)
 Returns the tag associated with the object for the property of the class.
static void setTag (const QString &className, const QString &property, const QString &tag, QVariant value)
 Associates the given object with the tag for the property of the given class.

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.

Detailed Description

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.

Member Data Documentation

◆ _tags

QHash< QString, QList< QPair< QString, QVariant > > > ConfigObject::Context::_tags
staticprotected
Initial value:
=
QHash<QString, QList<QPair<QString, QVariant>>>()

Set of tag-value pairs for all properties.


The documentation for this class was generated from the following files:
  • /builddir/build/BUILD/qdmr-0.14.1-build/qdmr-0.14.1/lib/configobject.hh
  • /builddir/build/BUILD/qdmr-0.14.1-build/qdmr-0.14.1/lib/configobject.cc