GDCM: gdcmFileNameEvent.h Source File

GDCM 3.2.11

gdcmFileNameEvent.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 GDCMFILENAMEEVENT_H
15#define GDCMFILENAMEEVENT_H
16
17#include "gdcmEvent.h"
18#include "gdcmTag.h"
19
20namespace gdcm
21{
22
29 class FileNameEvent : public AnyEvent
30{
31public:
32 typedef FileNameEvent Self;
33 typedef AnyEvent Superclass;
34 FileNameEvent(const char *s = ""):m_FileName(s) {}
35 ~FileNameEvent() override = default;
36
37 FileNameEvent(const Self&s) : AnyEvent(s){}
38 void operator=(const Self&) = delete;
39
40
41 const char * GetEventName() const override { return "FileNameEvent"; }
42 bool CheckEvent(const ::gdcm::Event* e) const override
43 { return dynamic_cast<const Self*>(e) ? true : false; }
44 ::gdcm::Event* MakeObject() const override
45 { return new Self; }
46
47 void SetFileName(const char *f) { m_FileName = f; }
48 const char *GetFileName() const { return m_FileName.c_str(); }
49private:
50 std::string m_FileName;
51};
52
53
54} // end namespace gdcm
55
56#endif //GDCMFILENAMEEVENT_H
gdcm::AnyEvent
Definition gdcmEvent.h:83
gdcm::Event
superclass for callback/observer methods
Definition gdcmEvent.h:27
gdcm::FileNameEvent::SetFileName
void SetFileName(const char *f)
Definition gdcmFileNameEvent.h:47
gdcm::FileNameEvent::Self
FileNameEvent Self
Definition gdcmFileNameEvent.h:32
gdcm::FileNameEvent::Superclass
AnyEvent Superclass
Definition gdcmFileNameEvent.h:33
gdcm::FileNameEvent::FileNameEvent
FileNameEvent(const Self &s)
Definition gdcmFileNameEvent.h:37
gdcm::FileNameEvent::operator=
void operator=(const Self &)=delete
gdcm::FileNameEvent::FileNameEvent
FileNameEvent(const char *s="")
Definition gdcmFileNameEvent.h:34
gdcm::FileNameEvent::~FileNameEvent
~FileNameEvent() override=default
gdcm::FileNameEvent::CheckEvent
bool CheckEvent(const ::gdcm::Event *e) const override
Definition gdcmFileNameEvent.h:42
gdcm::FileNameEvent::GetFileName
const char * GetFileName() const
Definition gdcmFileNameEvent.h:48
gdcm::FileNameEvent::GetEventName
const char * GetEventName() const override
Definition gdcmFileNameEvent.h:41
gdcm::FileNameEvent::MakeObject
::gdcm::Event * MakeObject() const override
Definition gdcmFileNameEvent.h:44
gdcmEvent.h
gdcmTag.h
gdcm
Definition gdcmASN1.h:21