Visualization Library 2.1.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vl::CRC32CheckSum Class Reference

Computes the a CRC32 checksum of a given buffer or VirtualFile. More...

#include <CRC32CheckSum.hpp>

Public Member Functions

 CRC32CheckSum ()
 Constructor. More...
 
unsigned int compute (const void *buf, int length)
 
unsigned int compute (VirtualFile *stream)
 
void startCRC32 ()
 
unsigned int finalizeCRC32 ()
 
void continueCRC32 (unsigned char *ptr, int length)
 

Protected Member Functions

void crc32_init ()
 
unsigned int reflect (unsigned int val, char ch)
 

Protected Attributes

unsigned int mCRC32
 
unsigned int crc32_table [256]
 

Detailed Description

Computes the a CRC32 checksum of a given buffer or VirtualFile.

Definition at line 42 of file CRC32CheckSum.hpp.

Constructor & Destructor Documentation

◆ CRC32CheckSum()

vl::CRC32CheckSum::CRC32CheckSum ( )
inline

Constructor.

Definition at line 49 of file CRC32CheckSum.hpp.

References crc32_init().

Member Function Documentation

◆ compute() [1/2]

unsigned int vl::CRC32CheckSum::compute ( const void *  buf,
int  length 
)
inline

Definition at line 51 of file CRC32CheckSum.hpp.

References crc32_table, and mCRC32.

Referenced by vl::VirtualFile::crc32(), and vl::ZippedFile::extract().

◆ compute() [2/2]

unsigned int vl::CRC32CheckSum::compute ( VirtualFile stream)
inline

◆ continueCRC32()

void vl::CRC32CheckSum::continueCRC32 ( unsigned char *  ptr,
int  length 
)
inline

Definition at line 75 of file CRC32CheckSum.hpp.

References crc32_table, and mCRC32.

Referenced by compute().

◆ crc32_init()

void vl::CRC32CheckSum::crc32_init ( )
inlineprotected

Definition at line 82 of file CRC32CheckSum.hpp.

References crc32_table, mCRC32, and reflect().

Referenced by CRC32CheckSum().

◆ finalizeCRC32()

unsigned int vl::CRC32CheckSum::finalizeCRC32 ( )
inline

Definition at line 74 of file CRC32CheckSum.hpp.

References mCRC32.

Referenced by compute().

◆ reflect()

unsigned int vl::CRC32CheckSum::reflect ( unsigned int  val,
char  ch 
)
inlineprotected

Definition at line 95 of file CRC32CheckSum.hpp.

Referenced by crc32_init().

◆ startCRC32()

void vl::CRC32CheckSum::startCRC32 ( )
inline

Definition at line 73 of file CRC32CheckSum.hpp.

References mCRC32.

Referenced by compute().

Member Data Documentation

◆ crc32_table

unsigned int vl::CRC32CheckSum::crc32_table[256]
protected

Definition at line 109 of file CRC32CheckSum.hpp.

Referenced by compute(), continueCRC32(), and crc32_init().

◆ mCRC32

unsigned int vl::CRC32CheckSum::mCRC32
protected

Definition at line 108 of file CRC32CheckSum.hpp.

Referenced by compute(), continueCRC32(), crc32_init(), finalizeCRC32(), and startCRC32().


The documentation for this class was generated from the following file: