libdrmconf
0.9.0
A library to program DMR radios.
|
Base class for all codeplug contexts. More...
#include <codeplug.hh>
Classes | |
class | Table |
Internal used table type to associate objects and indices. More... | |
Protected Member Functions | |
Context () | |
Hidden constrcutor. | |
ConfigObject * | obj (const QMetaObject *elementType, uint idx) |
Resolves the given index for the specifies element type. More... | |
int | index (ConfigObject *obj) |
Returns the index for the given object. More... | |
bool | add (ConfigObject *obj, uint idx) |
Associates the given object with the given index. | |
bool | hasTable (const QMetaObject *obj) const |
Returns true if a table is defined for the given type. | |
Table & | getTable (const QMetaObject *obj) |
Returns a reference to the table for the given type. | |
bool | addTable (const QMetaObject *obj) |
Adds a table for the given type. | |
Protected Attributes | |
QHash< QString, Table > | _tables |
Table of tables. | |
Base class for all codeplug contexts.
Each device specific codeplug may extend this class to allow for device specific elements to be indexed in a separate index. By default tables for DigitalContact
, RXGroupList
, Channel
, Zone
and ScanList
are defined. For any other type, an additional table must be defined first using addTable
.
|
protected |
Returns the index for the given object.
|
protected |
Resolves the given index for the specifies element type.
nullptr
if the index is not defined or the type is unknown.