libdrmconf  0.9.0
A library to program DMR radios.
Classes | Protected Member Functions | Protected Attributes | List of all members
CodePlug::Context Class Reference

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.
 
ConfigObjectobj (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.
 
TablegetTable (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.
 

Detailed Description

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.

Member Function Documentation

◆ index()

int CodePlug::Context::index ( ConfigObject obj)
protected

Returns the index for the given object.

Returns
-1 if no index is associated with the object or its type is unknown.

◆ obj()

ConfigObject * CodePlug::Context::obj ( const QMetaObject *  elementType,
uint  idx 
)
protected

Resolves the given index for the specifies element type.

Returns
nullptr if the index is not defined or the type is unknown.

The documentation for this class was generated from the following files: