GDCM
2.2.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
Common
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
;
29
typedef
AnyEvent
Superclass
;
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
Generated on Wed Jun 13 2012 20:40:37 for GDCM by
1.8.1