GDCM  2.4.5
gdcmDataEvent.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 GDCMDATAEVENT_H
15 #define GDCMDATAEVENT_H
16 
17 #include "gdcmEvent.h"
18 
19 namespace gdcm
20 {
21 
25 class DataEvent : public AnyEvent
26 {
27 public:
28  typedef DataEvent Self;
30  DataEvent(const char *bytes = 0, size_t len = 0):Bytes(bytes),Length(len) {}
31  virtual ~DataEvent() {}
32  virtual const char * GetEventName() const { return "DataEvent"; }
33  virtual bool CheckEvent(const ::gdcm::Event* e) const
34  { return (dynamic_cast<const Self*>(e) == NULL ? false : true) ; }
35  virtual ::gdcm::Event* MakeObject() const
36  { return new Self; }
37  DataEvent(const Self&s) : AnyEvent(s){};
38 
39  void SetData(const char *bytes, size_t len) {
40  Bytes = bytes;
41  Length = len;
42  }
43  size_t GetDataLength() const { return Length; }
44  const char *GetData() const { return Bytes; }
45 
46  //std::string GetValueAsString() const { return; }
47 
48 private:
49  void operator=(const Self&);
50  const char *Bytes;
51  size_t Length;
52 };
53 
54 
55 } // end namespace gdcm
56 
57 #endif //GDCMDATAEVENT_H
DataEvent.
Definition: gdcmDataEvent.h:25
AnyEvent Superclass
Definition: gdcmDataEvent.h:29
const char * GetData() const
Definition: gdcmDataEvent.h:44
size_t GetDataLength() const
Definition: gdcmDataEvent.h:43
virtual bool CheckEvent(const ::gdcm::Event *e) const
Definition: gdcmDataEvent.h:33
virtual const char * GetEventName() const
Definition: gdcmDataEvent.h:32
virtual ::gdcm::Event * MakeObject() const
Definition: gdcmDataEvent.h:35
Definition: gdcmEvent.h:85
DataEvent(const char *bytes=0, size_t len=0)
Definition: gdcmDataEvent.h:30
void SetData(const char *bytes, size_t len)
Definition: gdcmDataEvent.h:39
virtual ~DataEvent()
Definition: gdcmDataEvent.h:31
DataEvent Self
Definition: gdcmDataEvent.h:28
DataEvent(const Self &s)
Definition: gdcmDataEvent.h:37
Definition: gdcmASN1.h:20

Generated on Fri Sep 25 2015 17:58:22 for GDCM by doxygen 1.8.9.1
SourceForge.net Logo