Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
berryIJobChangeListener.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 
15 namespace berry
16 {
17 
19 {
20  if (!listener)
21  return;
22 
23  Types types = listener->GetEventTypes();
24 
25  if (types & ABOUT_TO_RUN)
27  if (types & AWAKE)
29  if (types & DONE)
31  if (types & RUNNING)
33  if (types & SCHEDULED)
35  if (types & SLEEPING)
37 }
38 
40 {
41  if (!listener)
42  return;
43 
50 }
51 
53 {
54  jobAboutToRun.SetExceptionHandler(handler);
55  jobAwake.SetExceptionHandler(handler);
56  jobDone.SetExceptionHandler(handler);
57  jobRunning.SetExceptionHandler(handler);
58  jobScheduled.SetExceptionHandler(handler);
59  jobSleeping.SetExceptionHandler(handler);
60 }
61 
62 }
static MsgHandler handler
Definition: usUtils.cpp:261
virtual void Sleeping(const IJobChangeEvent::ConstPointer &)
virtual void Scheduled(const IJobChangeEvent::ConstPointer &)
void AddListener(IJobChangeListener *listener)
MessageDelegate1< IJobChangeListener, const IJobChangeEvent::ConstPointer & > Delegate
virtual void Running(const IJobChangeEvent::ConstPointer &)
void RemoveListener(IJobChangeListener *listener)
void SetExceptionHandler(const AbstractExceptionHandler &handler)
virtual void AboutToRun(const IJobChangeEvent::ConstPointer &)
virtual void Awake(const IJobChangeEvent::ConstPointer &)
virtual Events::Types GetEventTypes()=0
virtual void Done(const IJobChangeEvent::ConstPointer &)