Medical Imaging Interaction Toolkit  2018.4.99-1640525a
Medical Imaging Interaction Toolkit
mitkInternalEvent.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkInternalEvent.h"
14 #include "mitkDataInteractor.h"
15 
17  DataInteractor *sourceInteractor,
18  const std::string &signalName)
19  : InteractionEvent(baseRenderer), m_DataInteractor(sourceInteractor), m_SignalName(signalName)
20 {
21 }
22 
23 bool mitk::InternalEvent::IsEqual(const mitk::InteractionEvent &interactionEvent) const
24 {
25  const auto &internalEvent = static_cast<const mitk::InternalEvent &>(interactionEvent);
26  return (m_SignalName == internalEvent.GetSignalName() && Superclass::IsEqual(interactionEvent));
27 }
28 
30 {
31 }
32 
34 {
35  return m_SignalName;
36 }
37 
39 {
40  return m_DataInteractor.GetPointer();
41 }
42 
44 {
45  return (nullptr != dynamic_cast<InternalEvent *>(baseClass.GetPointer()));
46 }
Organizes the rendering process.
Class to create events from within the application to signal about internal events.
virtual bool IsEqual(const InteractionEvent &other) const
bool IsEqual(const InteractionEvent &) const override
Base class from with interactors that handle DataNodes are to be derived.
std::string GetSignalName() const
bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const override
DataInteractor * GetTargetInteractor() const
InternalEvent(BaseRenderer *, DataInteractor *destInteractor, const std::string &signalName)