GDCM
2.0.18
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMPROGRESSEVENT_H 00015 #define GDCMPROGRESSEVENT_H 00016 00017 #include "gdcmEvent.h" 00018 #include "gdcmTag.h" 00019 00020 namespace gdcm 00021 { 00022 00029 class ProgressEvent : public AnyEvent 00030 { 00031 public: 00032 typedef ProgressEvent Self; 00033 typedef AnyEvent Superclass; 00034 ProgressEvent(double p = 0):m_Progress(p) {} 00035 virtual ~ProgressEvent() {} 00036 virtual const char * GetEventName() const { return "ProgressEvent"; } 00037 virtual bool CheckEvent(const ::gdcm::Event* e) const 00038 { return dynamic_cast<const Self*>(e) ? true : false; } 00039 virtual ::gdcm::Event* MakeObject() const 00040 { return new Self; } 00041 ProgressEvent(const Self&s) : AnyEvent(s){}; 00042 00043 void SetProgress(double p) { m_Progress = p; } 00044 double GetProgress() const { return m_Progress; } 00045 private: 00046 void operator=(const Self&); 00047 double m_Progress; 00048 }; 00049 00050 00051 } // end namespace gdcm 00052 00053 #endif //GDCMPROGRESSEVENT_H