libdrmconf 0.13.3
A library to program DMR radios.
Loading...
Searching...
No Matches
AbstractObjectFilterVisitor Class Referenceabstract

Filters instances by a test function. More...

#include <intermediaterepresentation.hh>

Inheritance diagram for AbstractObjectFilterVisitor:
Collaboration diagram for AbstractObjectFilterVisitor:

Public Member Functions

bool processProperty (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err)
 Processes the specified property of the item.
bool processList (AbstractConfigObjectList *list, const ErrorStack &err)
 Traverses the list of objects or references.
Public Member Functions inherited from Visitor
virtual ~Visitor ()
 Destructor.
virtual bool process (Config *config, const ErrorStack &err=ErrorStack())
 Traverses the properties of the configuration recursively.
virtual bool processEnum (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles an enum typed property.
virtual bool processBool (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles a boolean typed property.
virtual bool processInt (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles an integer typed property.
virtual bool processUInt (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles an unsigned integer typed property.
virtual bool processDouble (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles a double precision float typed property.
virtual bool processString (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles a string typed property.
virtual bool processFrequency (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles a Frequency typed property.
virtual bool processInterval (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles a Interval typed property.
virtual bool processSelectiveCall (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles a SelectiveCall typed property.
virtual bool processUnknownType (ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
 Handles a property of unknown type.
virtual bool processItem (ConfigItem *item, const ErrorStack &err=ErrorStack())
 Traverses the specified config item.
virtual bool processReference (ConfigObjectReference *, const ErrorStack &err=ErrorStack())
 Handles references to config objects.

Protected Slots

virtual bool toRemove (ConfigItem *item)=0
 Abstract test function.

Protected Member Functions

 AbstractObjectFilterVisitor ()
 Hidden constructor.
Protected Member Functions inherited from Visitor
 Visitor ()
 Hidden constructor.

Detailed Description

Filters instances by a test function.

This visitor can be used to remove elements from the abstract codeplug, not supported by the target device. Use ObjectFilterVisitor to remove instances of specific classes.

Member Function Documentation

◆ processList()

bool AbstractObjectFilterVisitor::processList ( AbstractConfigObjectList * list,
const ErrorStack & err )
virtual

Traverses the list of objects or references.

If list is a list of ConfigItem, the visitor will traverse those by calling processItem on every of these element. If it is a list of ConfigObjectRef references, the visitor stop here and simply return true. By default, the visitor does not follow references.

Reimplemented from Visitor.

◆ processProperty()

bool AbstractObjectFilterVisitor::processProperty ( ConfigItem * item,
const QMetaProperty & prop,
const ErrorStack & err )
virtual

Processes the specified property of the item.

This method dispatches to the type-specific methods like processEnum, processBool, processInt, processUInt, processDouble, processString, processItem, processReference, processList, and processUnknownType, depending on the type of the property. Do not override this method unless you need to handle all properties differently.

Reimplemented from Visitor.

◆ toRemove

virtual bool AbstractObjectFilterVisitor::toRemove ( ConfigItem * item)
protectedpure virtualslot

Abstract test function.

If this function returns true, the item will be removed.

Implemented in EncryptionKeyFilterVisitor.


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