#ifndef CTKEVENTBUSIMPL_H #define CTKEVENTBUSIMPL_H #include #include #include #include class ctkEventHandlerWrapper; class ctkEventBusImpl : public QObject, public ctkEventBus { Q_OBJECT Q_INTERFACES(ctkEventBus) public: static ctkEventBusImpl* instance(); void postEvent(const ctkEvent& event); void sendEvent(const ctkEvent& event); void publishSignal(const QObject* publisher, const char* signal); void subscribeSlot(const QObject* subscriber, const char* member, const Properties& properties); protected: typedef QList HandlerList; HandlerList globalWildcard; QHash topicName; void dispatchEvent(const ctkEvent& event, bool isAsync); void bucket(ctkEventHandlerWrapper* wrapper); QSet handlers(const QString& topic); private: ctkEventBusImpl(); }; #endif // CTKEVENTBUSIMPL_H