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