GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmProgressEvent.h
Go to the documentation of this file.
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
29 class ProgressEvent : public AnyEvent
30 {
31 public:
32 typedef ProgressEvent Self;
33 typedef AnyEvent Superclass;
34 ProgressEvent(double p = 0):m_Progress(p) {}
35 virtual ~ProgressEvent() {}
36 virtual const char * GetEventName() const { return "ProgressEvent"; }
37 virtual bool CheckEvent(const ::gdcm::Event* e) const
38 { return dynamic_cast<const Self*>(e) ? true : false; }
39 virtual ::gdcm::Event* MakeObject() const
40 { return new Self; }
41 ProgressEvent(const Self&s) : AnyEvent(s){};
42
43 void SetProgress(double p) { m_Progress = p; }
44 double GetProgress() const { return m_Progress; }
45 private:
46 void operator=(const Self&);
47 double m_Progress;
48 };
49
50
51 } // end namespace gdcm
52
53 #endif //GDCMPROGRESSEVENT_H