Medical Imaging Interaction Toolkit  2016.11.0
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,
6  Division of Medical and Biological Informatics.
7  All rights reserved.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without
10  even the implied warranty of MERCHANTABILITY or FITNESS FOR
11  A PARTICULAR PURPOSE.
12 
13  See LICENSE.txt or http://www.mitk.org for details.
14 
15  ===================================================================*/
16 
17 #include "mitkInternalEvent.h"
18 #include "mitkDataInteractor.h"
19 
21  DataInteractor *sourceInteractor,
22  const std::string &signalName)
23  : InteractionEvent(baseRenderer), m_DataInteractor(sourceInteractor), m_SignalName(signalName)
24 {
25 }
26 
27 bool mitk::InternalEvent::IsEqual(const mitk::InteractionEvent &interactionEvent) const
28 {
29  const mitk::InternalEvent &internalEvent = static_cast<const mitk::InternalEvent &>(interactionEvent);
30  return (m_SignalName == internalEvent.GetSignalName() && Superclass::IsEqual(interactionEvent));
31 }
32 
34 {
35 }
36 
38 {
39  return m_SignalName;
40 }
41 
43 {
44  return m_DataInteractor.GetPointer();
45 }
46 
48 {
49  return (NULL != dynamic_cast<InternalEvent *>(baseClass.GetPointer()));
50 }
Organizes the rendering process.
Class to create events from within the application to signal about internal events.
std::string GetSignalName() const
virtual bool IsEqual(const InteractionEvent &) const override
Base class from with interactors that handle DataNodes are to be derived.
virtual bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const override
InternalEvent(BaseRenderer *, DataInteractor *destInteractor, const std::string &signalName)
DataInteractor * GetTargetInteractor() const