CRC32 Class Reference

#include <CRC32.hpp>

List of all members.


Detailed Description

This class is used to generate a CRC-32 checksum for a sequence of bytes.

Definition at line 46 of file CRC32.hpp.

Public Member Functions

 CRC32 ()
 Default constructor.
void reset ()
 Resets the CRC32 to initial value.
unsigned int getValue () const
 Get the CRC32 checksum.
void update (const std::string &str)
 Updates the CRC32 with specified string.
void update (const char *buf, unsigned int len)
 Updates the CRC32 checksum with specified array of bytes.

Protected Attributes

unsigned int crc32
 The current CRC32 value.

Static Protected Attributes

const unsigned int crc_table [256]
 Table used to compute the CRC32 value.


Constructor & Destructor Documentation

CRC32  )  [inline]
 

Default constructor.

Definition at line 57 of file CRC32.hpp.


Member Function Documentation

unsigned int getValue  )  const [inline]
 

Get the CRC32 checksum.

Definition at line 69 of file CRC32.hpp.

Referenced by PNG::chunk().

void reset void   )  [inline]
 

Resets the CRC32 to initial value.

Definition at line 63 of file CRC32.hpp.

void update const char *  buf,
unsigned int  len
 

Updates the CRC32 checksum with specified array of bytes.

Parameters:
buf The byte array to update the CRC32 with
len The length of the byte array

void update const std::string &  str  )  [inline]
 

Updates the CRC32 with specified string.

Parameters:
str The string to update the CRC32 with

Definition at line 78 of file CRC32.hpp.

Referenced by PNG::chunk().


Member Data Documentation

unsigned int crc32 [protected]
 

The current CRC32 value.

Definition at line 53 of file CRC32.hpp.

const unsigned int crc_table[256] [static, protected]
 

Table used to compute the CRC32 value.

Definition at line 50 of file CRC32.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 9 03:31:16 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1