31 MITK_ERROR <<
"BindDispatcherInteractor() - Context could not be obtained.";
46 UnRegisterDataStorageEvents();
48 RegisterDataStorageEvents();
56 UnRegisterDataStorageEvents();
60 void mitk::BindDispatcherInteractor::RegisterInteractor(
const mitk::DataNode *dataNode)
62 if (m_Dispatcher.IsNotNull())
64 m_Dispatcher->AddDataInteractor(dataNode);
68 void mitk::BindDispatcherInteractor::RegisterDataStorageEvents()
72 m_DataStorage->AddNodeEvent.AddListener(MessageDelegate1<BindDispatcherInteractor, const DataNode *>(
73 this, &BindDispatcherInteractor::RegisterInteractor));
75 m_DataStorage->RemoveNodeEvent.AddListener(MessageDelegate1<BindDispatcherInteractor, const DataNode *>(
76 this, &BindDispatcherInteractor::UnRegisterInteractor));
78 m_DataStorage->InteractorChangedNodeEvent.AddListener(MessageDelegate1<BindDispatcherInteractor, const DataNode *>(
79 this, &BindDispatcherInteractor::RegisterInteractor));
83 void mitk::BindDispatcherInteractor::UnRegisterInteractor(
const DataNode *dataNode)
85 if (m_Dispatcher.IsNotNull())
87 m_Dispatcher->RemoveDataInteractor(dataNode);
98 m_Dispatcher = dispatcher;
101 void mitk::BindDispatcherInteractor::UnRegisterDataStorageEvents()
106 this, &BindDispatcherInteractor::RegisterInteractor));
108 this, &BindDispatcherInteractor::UnRegisterInteractor));
111 &BindDispatcherInteractor::RegisterInteractor));
static Module * GetModule(long id)
void SetDataStorage(DataStorage::Pointer dataStorage)
mitk::DataStorage::Pointer m_DataStorage
Dispatcher::Pointer GetDispatcher() const
~BindDispatcherInteractor()
ModuleContext * GetModuleContext() const
BindDispatcherInteractor(const std::string &)
Class for nodes of the DataTree.
static Pointer New(const std::string &_arg)
void SetDispatcher(Dispatcher::Pointer dispatcher)