CRC_Table - Man Page

CRC lookup table. After construction, the CRC parameters are fixed.

Synopsis

#include <CRC.h>

Public Member Functions

Table (const Parameters< CRCType, CRCWidth > &parameters)
Constructs a CRC table from a set of CRC parameters.
Table (Parameters< CRCType, CRCWidth > &&parameters)
Constructs a CRC table from a set of CRC parameters.
const Parameters< CRCType, CRCWidth > & GetParameters () const
Gets the CRC parameters used to construct the CRC table.
const CRCType * GetTable () const
Gets the CRC table.
CRCType operator[] (unsigned char index) const
Gets an entry in the CRC table.

Private Member Functions

void InitTable ()
Initializes a CRC table.

Private Attributes

Parameters< CRCType, CRCWidth > parameters
CRC parameters used to construct the table.
CRCType table [1<< CHAR_BIT]
CRC lookup table.

Detailed Description

template<typename CRCType, crcpp_uint16 CRCWidth>

struct CRC::Table< CRCType, CRCWidth >"CRC lookup table. After construction, the CRC parameters are fixed.

Note

A CRC table can be used for multiple CRC calculations.

Constructor & Destructor Documentation

template<typename CRCType, crcpp_uint16 CRCWidth> CRC::Table< CRCType, CRCWidth >::Table (const Parameters< CRCType, CRCWidth > & params) [inline]

Constructs a CRC table from a set of CRC parameters.

Parameters

params CRC parameters

Template Parameters

CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC

template<typename CRCType, crcpp_uint16 CRCWidth> CRC::Table< CRCType, CRCWidth >::Table (Parameters< CRCType, CRCWidth > && params) [inline]

Constructs a CRC table from a set of CRC parameters.

Parameters

params CRC parameters

Template Parameters

CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC

Member Function Documentation

template<typename CRCType, crcpp_uint16 CRCWidth> const CRC::Parameters< CRCType, CRCWidth > & CRC::Table< CRCType, CRCWidth >::GetParameters () const [inline]

Gets the CRC parameters used to construct the CRC table.

Template Parameters

CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC

Returns

CRC parameters

template<typename CRCType, crcpp_uint16 CRCWidth> const CRCType * CRC::Table< CRCType, CRCWidth >::GetTable () const [inline]

Gets the CRC table.

Template Parameters

CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC

Returns

CRC table

template<typename CRCType, crcpp_uint16 CRCWidth> void CRC::Table< CRCType, CRCWidth >::InitTable () [inline], [private]

Initializes a CRC table.

Template Parameters

CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC

template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::Table< CRCType, CRCWidth >::operator[] (unsigned char index) const [inline]

Gets an entry in the CRC table.

Parameters

index Index into the CRC table

Template Parameters

CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC

Returns

CRC table entry

Member Data Documentation

template<typename CRCType, crcpp_uint16 CRCWidth> Parameters<CRCType, CRCWidth> CRC::Table< CRCType, CRCWidth >::parameters [private]

CRC parameters used to construct the table.

template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::Table< CRCType, CRCWidth >::table[1<< CHAR_BIT] [private]

CRC lookup table.

Author

Generated automatically by Doxygen for CRC++ from the source code.

Info

Version 1.0.1.0 CRC++