A simple messaging service for sending and receiving data node selections for certain contexts.
More...
#include <mitkINodeSelectionService.h>
A simple messaging service for sending and receiving data node selections for certain contexts.
- See also
- CoreServices::GetPreferencesService()
-
INodeSelectionListener
Definition at line 31 of file mitkINodeSelectionService.h.
◆ ~INodeSelectionService()
virtual mitk::INodeSelectionService::~INodeSelectionService |
( |
| ) |
|
|
virtual |
◆ AddListener()
virtual bool mitk::INodeSelectionService::AddListener |
( |
const std::string & |
context, |
|
|
INodeSelectionListener * |
listener |
|
) |
| |
|
pure virtual |
Add a listener for selections in a certain selection context.
A selection context is a non-empty, arbitrary and unique string that both sender and receiver agreed upon. A listener must not be nullptr
and can be added only once.
- Parameters
-
context | A non-empty, arbitrary and unique string that both sender and receiver agreed upon. |
listener | A valid pointer to a class implementing the listener interface. |
- Returns
true
if the listener was successfully added or already has been added before, or false
otherwise.
Implemented in mitk::NodeSelectionService.
◆ RemoveListener() [1/2]
Remove a listener from selections of all selection contexts.
- Parameters
-
listener | A pointer to an already added listener. |
- Returns
true
if the listener was actually found, or false
otherwise.
- See also
- AddListener()
Implemented in mitk::NodeSelectionService.
◆ RemoveListener() [2/2]
virtual bool mitk::INodeSelectionService::RemoveListener |
( |
const std::string & |
context, |
|
|
const INodeSelectionListener * |
listener |
|
) |
| |
|
pure virtual |
Remove a listener from selections of a certain selection context.
- Parameters
-
context | A non-empty, arbitrary and unique string that both sender and receiver agreed upon. |
listener | A pointer to an already added listener. |
- Returns
true
if the listener was actually found for the given context, or false
otherwise.
- See also
- AddListener()
Implemented in mitk::NodeSelectionService.
◆ SendSelection()
virtual bool mitk::INodeSelectionService::SendSelection |
( |
const std::string & |
context, |
|
|
const std::vector< mitk::DataNode::Pointer > & |
selection |
|
) |
| const |
|
pure virtual |
Send a selection to all listeners of a certain selection context.
- Parameters
-
context | A non-empty, arbitrary and unique string that both sender and receiver agreed upon. |
selection | A selection of potentially multiple data nodes to send to any listeners for the given selection context. |
- See also
- AddListener()
Implemented in mitk::NodeSelectionService.
The documentation for this class was generated from the following file: