Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkOperationActor.h
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 #ifndef OPERATIONACTOR_H_HEADER_INCLUDED_C16E28BD
18 #define OPERATIONACTOR_H_HEADER_INCLUDED_C16E28BD
19 
20 #include <MitkCoreExports.h>
21 #include <mitkCommon.h>
22 
24 #define mitkCheckOperationTypeMacro(OperationType, operation, newOperationName) \
25  \
26  OperationType *newOperationName = dynamic_cast<OperationType *>(operation); \
27  \
28  if (newOperationName == NULL) \
29  \
30  { \
31  itkWarningMacro("Recieved wrong type of operation!"); \
32  return; \
33  }
34 
35 namespace mitk
36 {
37  class Operation;
38  class OperationEvent;
39 
46  {
47  public:
49 
50  virtual ~OperationActor()
51  {
52  }
53  virtual void ExecuteOperation(Operation *operation) = 0;
54  };
55 }
56 
57 #endif /* OPERATIONACTOR_H_HEADER_INCLUDED_C16E28BD */
#define MITKCORE_EXPORT
Base class of all Operation-classes.
Definition: mitkOperation.h:33
DataCollection - Class to facilitate loading/accessing structured data.
abstract class, that can be used by Undo to undo an operation.
itkTypeMacroNoParent(OperationActor) virtual ~OperationActor()