Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkSimpleFunctorPolicy.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 
14 
17 
18 unsigned int
20 {
21  unsigned int result = 0;
22 
23  if (m_Functor.IsNotNull())
24  {
25  result = m_Functor->GetNumberOfOutputs();
26  }
27 
28  return result;
29 }
30 
31 void
33 {
34  if (!functor)
35  {
36  itkGenericExceptionMacro(<< "Error. Functor is Null.");
37  }
38 
39  m_Functor = functor;
40 }
41 
42 
43 bool
45 {
46  return !(*this == other);
47 }
48 
49 bool
51 {
52  return (this->m_Functor == other.m_Functor);
53 }
void SetFunctor(const mitk::SimpleFunctorBase *functor)
bool operator!=(const SimpleFunctorPolicy &other) const
unsigned int GetNumberOfOutputs() const
bool operator==(const SimpleFunctorPolicy &other) const