OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
ofstd
include
dcmtk
ofstd
ofcrc32.h
1
/*
2
*
3
* Copyright (C) 2002-2010, OFFIS e.V.
4
* All rights reserved. See COPYRIGHT file for details.
5
*
6
* This software and supporting documentation were developed by
7
*
8
* OFFIS e.V.
9
* R&D Division Health
10
* Escherweg 2
11
* D-26121 Oldenburg, Germany
12
*
13
*
14
* Module: ofstd
15
*
16
* Author: Marco Eichelberg
17
*
18
* Purpose: general purpose 32-bit CRC in C++
19
* Code is based on the CRC32 implementation (C)1986 Gary S. Brown
20
*
21
* Last Update: $Author: joergr $
22
* Update Date: $Date: 2010-10-14 13:15:50 $
23
* CVS/RCS Revision: $Revision: 1.4 $
24
* Status: $State: Exp $
25
*
26
* CVS/RCS Log at end of file
27
*
28
*/
29
30
31
#ifndef OFCRC32_H
32
#define OFCRC32_H
33
34
37
class
OFCRC32
38
{
39
public
:
40
42
OFCRC32
()
43
:
value
(0)
44
{
45
}
46
48
~OFCRC32
()
49
{
50
}
51
53
void
reset
()
54
{
55
value
=0;
56
}
57
62
void
addBlock
(
const
void
*ptr,
unsigned
long
size);
63
65
unsigned
int
getCRC32
()
const
66
{
67
return
value
;
68
}
69
75
static
unsigned
int
compute
(
const
void
*ptr,
unsigned
long
size);
76
77
private
:
79
static
const
unsigned
int
crctab
[256];
80
82
unsigned
int
value
;
83
};
84
85
#endif
86
87
88
/*
89
* CVS/RCS Log:
90
* $Log: ofcrc32.h,v $
91
* Revision 1.4 2010-10-14 13:15:50 joergr
92
* Updated copyright header. Added reference to COPYRIGHT file.
93
*
94
* Revision 1.3 2005/12/08 16:05:53 meichel
95
* Changed include path schema for all DCMTK header files
96
*
97
* Revision 1.2 2003/12/05 10:37:41 joergr
98
* Removed leading underscore characters from preprocessor symbols (reserved
99
* symbols). Updated copyright date where appropriate.
100
*
101
* Revision 1.1 2002/01/08 10:18:48 joergr
102
* Added general purpose class which computes a CRC32 checksum on arbitrary
103
* data.
104
*
105
*
106
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2