IGSTK

/build/buildd/igstk-4.2.0/Source/igstkNDIErrorEvent.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Image Guided Surgery Software Toolkit
00004   Module:    $RCSfile: igstkNDIErrorEvent.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-02-11 01:41:51 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
00010   See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __igstkNDIErrorEvent_h
00018 #define __igstkNDIErrorEvent_h
00019 
00020 
00021 #include "igstkEvents.h"
00022 
00023 
00024 namespace igstk
00025 {
00026 
00035 class NDIErrorEvent : public IGSTKEvent 
00036 {
00037 
00038 public: 
00039   typedef NDIErrorEvent Self; 
00040   typedef IGSTKEvent    Superclass;
00041 
00043   NDIErrorEvent() {
00044     m_ErrorCode = 0; };
00045 
00047   NDIErrorEvent( int errorCode ) {
00048     m_ErrorCode = errorCode; }
00049 
00051   NDIErrorEvent(const Self & s) : IGSTKEvent( s ) {
00052     m_ErrorCode = s.m_ErrorCode; }
00053  
00055   virtual ~NDIErrorEvent() {};
00056 
00058   virtual const char * GetEventName() const {
00059     return "NDIErrorEvent"; }
00060 
00062   virtual bool CheckEvent(const ::itk::EventObject* e) const {
00063     return dynamic_cast<const Self*>(e); }
00064 
00066   virtual ::itk::EventObject* MakeObject() const {
00067     return new Self; }
00068 
00070   const unsigned int GetErrorCode() const {
00071     return m_ErrorCode; }
00072 
00073 private:
00074   void operator=(const Self&); 
00075 
00076   // Payload of this event.
00077   int  m_ErrorCode;
00078 };
00079 
00080 }
00081 
00082 #endif