GDCM 3.0.24
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
20namespace gdcm
21{
22
29class ProgressEvent : public AnyEvent
30{
31public:
34 ProgressEvent(double p = 0):m_Progress(p) {}
35 ~ProgressEvent() override = default;
36
37 ProgressEvent(const Self&s) : AnyEvent(s){};
38 void operator=(const Self&) = delete;
39
40 const char * GetEventName() const override { return "ProgressEvent"; }
41 bool CheckEvent(const ::gdcm::Event* e) const override
42 { return dynamic_cast<const Self*>(e) ? true : false; }
43 ::gdcm::Event* MakeObject() const override
44 { return new Self; }
45
46 void SetProgress(double p) { m_Progress = p; }
47 double GetProgress() const { return m_Progress; }
48private:
49 double m_Progress;
50};
51
52
53} // end namespace gdcm
54
55#endif //GDCMPROGRESSEVENT_H
Definition gdcmEvent.h:83
superclass for callback/observer methods
Definition gdcmEvent.h:27
ProgressEvent.
Definition gdcmProgressEvent.h:30
::gdcm::Event * MakeObject() const override
Definition gdcmProgressEvent.h:43
~ProgressEvent() override=default
ProgressEvent Self
Definition gdcmProgressEvent.h:32
const char * GetEventName() const override
Definition gdcmProgressEvent.h:40
void SetProgress(double p)
Definition gdcmProgressEvent.h:46
double GetProgress() const
Definition gdcmProgressEvent.h:47
ProgressEvent(const Self &s)
Definition gdcmProgressEvent.h:37
void operator=(const Self &)=delete
bool CheckEvent(const ::gdcm::Event *e) const override
Definition gdcmProgressEvent.h:41
AnyEvent Superclass
Definition gdcmProgressEvent.h:33
ProgressEvent(double p=0)
Definition gdcmProgressEvent.h:34
Definition gdcmASN1.h:21