gdcmProgressEvent.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMPROGRESSEVENT_H
#define GDCMPROGRESSEVENT_H
#include "gdcmEvent.h"
#include "gdcmTag.h"
namespace gdcm
{
class ProgressEvent : public AnyEvent
{
public:
typedef ProgressEvent Self;
typedef AnyEvent Superclass;
ProgressEvent(double p = 0):m_Progress(p) {}
~ProgressEvent() override = default;
ProgressEvent(const Self&s) : AnyEvent(s){};
void operator=(const Self&) = delete;
const char * GetEventName() const override { return "ProgressEvent"; }
bool CheckEvent(const ::gdcm::Event* e) const override
{ return dynamic_cast<const Self*>(e) ? true : false; }
::gdcm::Event* MakeObject() const override
{ return new Self; }
void SetProgress(double p) { m_Progress = p; }
double GetProgress() const { return m_Progress; }
private:
double m_Progress;
};
} // end namespace gdcm
#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