NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Helper class for listening to services being added, modified and removed. More...
#include <cxServiceTrackerListener.h>
Public Member Functions | |
ServiceTrackerListener (ctkPluginContext *context, boost::function< void(T *)> serviceAdded, boost::function< void(T *)> serviceModified, boost::function< void(T *)> serviceRemoved) | |
~ServiceTrackerListener () | |
void | open () |
T * | getServiceFromName (QString name) |
QList< T * > | getServices () |
Helper class for listening to services being added, modified and removed.
Usage example: For listening to ReconstructionServices being added and removed, but ignoring if they are modified
NB: This class can only be used with a valid plugin context. And plugin contexts are only valid when the plugin framework is in one of these states: ACTIVE, STARTING and STOPPING
boost::shared_ptr<ServiceTrackerListener<ReconstructionService> > mServiceListener; mServiceListener.reset(new ServiceTrackerListener<ReconstructionService>( LogicManager::getInstance()->getPluginFramework(), boost::bind(&ReconstructManager::onServiceAdded, this, _1), boost::bind(&ReconstructManager::onServiceModified, this, _1), boost::bind(&ReconstructManager::onServiceRemoved, this, _1) ));
Definition at line 53 of file cxServiceTrackerListener.h.
|
inline |
Definition at line 57 of file cxServiceTrackerListener.h.
|
inline |
Definition at line 70 of file cxServiceTrackerListener.h.
|
inline |
Definition at line 82 of file cxServiceTrackerListener.h.
|
inline |
Definition at line 91 of file cxServiceTrackerListener.h.
|
inline |
Definition at line 77 of file cxServiceTrackerListener.h.