IGSTK
igstkNDIErrorEvent.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkNDIErrorEvent.h,v $
5  Language: C++
6  Date: $Date: 2008-02-11 01:41:51 $
7  Version: $Revision: 1.7 $
8 
9  Copyright (c) ISC Insight Software Consortium. All rights reserved.
10  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __igstkNDIErrorEvent_h
18 #define __igstkNDIErrorEvent_h
19 
20 
21 #include "igstkEvents.h"
22 
23 
24 namespace igstk
25 {
26 
35 class NDIErrorEvent : public IGSTKEvent
36 {
37 
38 public:
39  typedef NDIErrorEvent Self;
40  typedef IGSTKEvent Superclass;
41 
44  m_ErrorCode = 0; };
45 
47  NDIErrorEvent( int errorCode ) {
48  m_ErrorCode = errorCode; }
49 
51  NDIErrorEvent(const Self & s) : IGSTKEvent( s ) {
52  m_ErrorCode = s.m_ErrorCode; }
53 
55  virtual ~NDIErrorEvent() {};
56 
58  virtual const char * GetEventName() const {
59  return "NDIErrorEvent"; }
60 
62  virtual bool CheckEvent(const ::itk::EventObject* e) const {
63  return dynamic_cast<const Self*>(e); }
64 
66  virtual ::itk::EventObject* MakeObject() const {
67  return new Self; }
68 
70  const unsigned int GetErrorCode() const {
71  return m_ErrorCode; }
72 
73 private:
74  void operator=(const Self&);
75 
76  // Payload of this event.
77  int m_ErrorCode;
78 };
79 
80 }
81 
82 #endif