CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Plugins
org.commontk.eventbus
ctkTopicRegistry.h
Go to the documentation of this file.
1
/*
2
* ctkTopicRegistry.h
3
* ctkEventBus
4
*
5
* Created by Roberto Mucci on 26/01/11.
6
* Copyright 2011 B3C. All rights reserved.
7
*
8
* See Licence at: http://tiny.cc/QXJ4D
9
*
10
*/
11
12
#ifndef CTKTOPICREGISTRY_H
13
#define CTKTOPICREGISTRY_H
14
15
// Includes list
16
#include "
ctkEventDefinitions.h
"
17
18
namespace
ctkEventBus
{
19
24
class
org_commontk_eventbus_EXPORT
ctkTopicRegistry
{
25
public
:
27
static
ctkTopicRegistry
*
instance
();
28
30
void
shutdown
();
31
33
bool
registerTopic
(
const
QString topic,
const
QObject *owner);
34
36
bool
unregisterTopic
(
const
QString topic);
37
39
const
QObject *
owner
(
const
QString topic)
const
;
40
42
bool
isTopicRegistered
(
const
QString topic)
const
;
43
45
void
dump
();
46
47
private
:
49
ctkTopicRegistry
();
50
51
QHash<QString, const QObject*>
m_TopicHash;
52
};
53
54
}
//nameSpace ctkEventBus
55
56
#endif // MAFTOPICREGISTRY_H
ctkEventDefinitions.h
ctkEventBus::ctkTopicRegistry::unregisterTopic
bool unregisterTopic(const QString topic)
Unregister a topic.
ctkEventBus::ctkTopicRegistry::registerTopic
bool registerTopic(const QString topic, const QObject *owner)
Register a new topic.
ctkEventBus::ctkTopicRegistry::shutdown
void shutdown()
Destroy the singleton instance. To be called at the end of the application.
QHash< QString, const QObject * >
ctkEventBus::ctkTopicRegistry::dump
void dump()
Dump of the topic hash.
ctkEventBus::ctkTopicRegistry::owner
const QObject * owner(const QString topic) const
Return the owner of a topic.
ctkEventBus::ctkTopicRegistry
Definition:
ctkTopicRegistry.h:24
ctkEventBus::ctkTopicRegistry::isTopicRegistered
bool isTopicRegistered(const QString topic) const
Check if a topic is present in the topic hash.
ctkEventBus::ctkTopicRegistry::instance
static ctkTopicRegistry * instance()
Return an instance of the event bus.
ctkEventBus
Definition:
ctkEventBusManager.h:21
Generated on Fri Sep 4 2020 00:00:00 for CTK by
1.8.20