1 /*=========================================================================
2 
3   Program: GDCM (Grassroots DICOM). A DICOM library
4 
5   Copyright (c) 2006-2011 Mathieu Malaterre
6   All rights reserved.
7   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8 
9      This software is distributed WITHOUT ANY WARRANTY; without even
10      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11      PURPOSE.  See the above copyright notice for more information.
12 
13 =========================================================================*/
14 #ifndef GDCMPROGRESSEVENT_H
15 #define GDCMPROGRESSEVENT_H
16 
17 #include "gdcmEvent.h"
18 #include "gdcmTag.h"
19 
20 namespace gdcm
21 {
22 
23 /**
24  * \brief ProgressEvent
25  * \details Special type of event triggered during
26  *
27  * \see AnyEvent
28  */
29 class ProgressEvent : public AnyEvent
30 {
31 public:
32   typedef ProgressEvent Self;
33   typedef AnyEvent Superclass;
m_Progress(p)34   ProgressEvent(double p = 0):m_Progress(p) {}
35   ~ProgressEvent() override = default;
36 
ProgressEvent(const Self & s)37   ProgressEvent(const Self&s) : AnyEvent(s){};
38   void operator=(const Self&) = delete;
39 
GetEventName()40   const char * GetEventName() const override { return "ProgressEvent"; }
CheckEvent(const::gdcm::Event * e)41   bool CheckEvent(const ::gdcm::Event* e) const override
42     { return dynamic_cast<const Self*>(e) ? true : false; }
MakeObject()43   ::gdcm::Event* MakeObject() const override
44     { return new Self; }
45 
SetProgress(double p)46   void SetProgress(double p) { m_Progress = p; }
GetProgress()47   double GetProgress() const { return m_Progress; }
48 private:
49   double m_Progress;
50 };
51 
52 
53 } // end namespace gdcm
54 
55 #endif //GDCMPROGRESSEVENT_H
56