# gdcmProgressEvent.h

Go to the documentation of this file.

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