12 #ifndef CTKEVENTBUSMANAGER_H
13 #define CTKEVENTBUSMANAGER_H
49 void removeObserver(
const QObject *obj,
const QString topic =
"",
bool qt_disconnect =
true);
55 void removeSignal(
const QObject *obj, QString topic =
"",
bool qt_disconnect =
true);
85 bool createServer(
const QString &communication_protocol,
unsigned int listen_port);
91 bool createClient(
const QString &communication_protocol,
const QString &server_host,
unsigned int port);
107 bool m_EnableEventLogging;
108 QString m_LogEventTopic;
void notifyEvent(ctkBusEvent &event_dictionary, ctkEventArgumentsList *argList=NULL, QGenericReturnArgument *returnArg=NULL) const
Notify events associated to the given id locally to the application.
bool removeEventProperty(ctkBusEvent &props) const
Remove the event property from the event bus hash.
void startListen()
Allow to start server listening.
bool isLocalSignalPresent(const QString topic) const
Retrieve if the signal has been registered previously.
bool addEventProperty(ctkBusEvent &props) const
Add a new event property (observer or event) to the event bus hash.
void shutdown()
Destroy the singleton instance. To be called at the end of the application.
static ctkEventBusManager * instance()
Return an instance of the event bus.
void notifyEvent(const QString topic, ctkEventType ev_type=ctkEventTypeLocal, ctkEventArgumentsList *argList=NULL, QGenericReturnArgument *returnArg=NULL) const
Notify event associated to the given id locally to the application.
void plugNetworkConnector(const QString &protocol, ctkNetworkConnector *connector)
Plug a new network connector into the connector hash for the given network protocol (protocol eg....
void initializeNetworkConnectors()
initialize NetworkConnectors
void logAllEvents()
When enabled, allows logging all events. It reset the value for m_LogEventId to -1 (the default)
void removeObserver(const QObject *obj, const QString topic="", bool qt_disconnect=true)
Remove the object passed as argument from the observer's hash.
bool createServer(const QString &communication_protocol, unsigned int listen_port)
Create the server for remote communication according to the given protocol and listen port.
void logEventTopic(const QString topic)
When logging is enabled, allows logging events releted to specific id (require a valid topic).
bool createClient(const QString &communication_protocol, const QString &server_host, unsigned int port)
Create the client for remote communication according to the given protocol, server host and port.
void enableEventLogging(bool enable=true)
Enable/Disable event logging to allow dumping events notification into the selected logging output st...
void removeSignal(const QObject *obj, QString topic="", bool qt_disconnect=true)
Remove the object passed as argument from the signal emitter's hash.
void detachObjectFromBus()
Intercepts objects deletation and detach them from the event bus.
#define ctkGenericReturnArgument