GDCM: gdcmProgressEvent.h Source File

GDCM 3.0.25

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
29 class ProgressEvent : public AnyEvent
30{
31public:
32 typedef ProgressEvent Self;
33 typedef AnyEvent Superclass;
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
gdcm::AnyEvent
Definition gdcmEvent.h:83
gdcm::Event
superclass for callback/observer methods
Definition gdcmEvent.h:27
gdcm::ProgressEvent::MakeObject
::gdcm::Event * MakeObject() const override
Definition gdcmProgressEvent.h:43
gdcm::ProgressEvent::~ProgressEvent
~ProgressEvent() override=default
gdcm::ProgressEvent::Self
ProgressEvent Self
Definition gdcmProgressEvent.h:32
gdcm::ProgressEvent::GetEventName
const char * GetEventName() const override
Definition gdcmProgressEvent.h:40
gdcm::ProgressEvent::SetProgress
void SetProgress(double p)
Definition gdcmProgressEvent.h:46
gdcm::ProgressEvent::GetProgress
double GetProgress() const
Definition gdcmProgressEvent.h:47
gdcm::ProgressEvent::ProgressEvent
ProgressEvent(const Self &s)
Definition gdcmProgressEvent.h:37
gdcm::ProgressEvent::operator=
void operator=(const Self &)=delete
gdcm::ProgressEvent::CheckEvent
bool CheckEvent(const ::gdcm::Event *e) const override
Definition gdcmProgressEvent.h:41
gdcm::ProgressEvent::Superclass
AnyEvent Superclass
Definition gdcmProgressEvent.h:33
gdcm::ProgressEvent::ProgressEvent
ProgressEvent(double p=0)
Definition gdcmProgressEvent.h:34
gdcmEvent.h
gdcmTag.h
gdcm
Definition gdcmASN1.h:21