Disk ARchive 2.7.16
Full featured and portable backup and archiving tool
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
libdar::crc_n Class Reference

crc implementation based on U_I More...

#include <crc.hpp>

+ Inheritance diagram for libdar::crc_n:
+ Collaboration diagram for libdar::crc_n:

Public Member Functions

 crc_n (U_I width)
 
 crc_n (U_I width, proto_generic_file &f)
 
 crc_n (const crc_n &ref)
 
 crc_n (crc_n &&ref) noexcept=default
 
crc_noperator= (const crc_n &ref)
 
crc_noperator= (crc_n &&ref) noexcept=default
 
bool operator== (const crc &ref) const override
 
virtual void compute (const infinint &offset, const char *buffer, U_I length) override
 
virtual void compute (const char *buffer, U_I length) override
 
virtual void clear () override
 
virtual void dump (proto_generic_file &f) const override
 
virtual std::string crc2str () const override
 
virtual infinint get_size () const override
 
- Public Member Functions inherited from libdar::crc
 crc (const crc &ref)=default
 
 crc (crc &&ref) noexcept=default
 
crcoperator= (const crc &ref)=default
 
crcoperator= (crc &&ref) noexcept=default
 
virtual bool operator== (const crc &ref) const =0
 
bool operator!= (const crc &ref) const
 
virtual void compute (const infinint &offset, const char *buffer, U_I length)=0
 
virtual void compute (const char *buffer, U_I length)=0
 
virtual void clear ()=0
 
virtual void dump (proto_generic_file &f) const =0
 
virtual std::string crc2str () const =0
 
virtual infinint get_size () const =0
 
virtual crcclone () const =0
 

Protected Member Functions

virtual crcclone () const override
 

Private Member Functions

void alloc (U_I width)
 
void copy_from (const crc_n &ref)
 
void copy_data_from (const crc_n &ref)
 
void destroy ()
 

Private Attributes

U_I size
 size of checksum (non infinint mode) More...
 
unsigned char * pointer
 points to the next byte to modify (non infinint mode) More...
 
unsigned char * cyclic
 the checksum storage (non infinint mode) More...
 

Additional Inherited Members

- Static Public Attributes inherited from libdar::crc
static constexpr U_I OLD_CRC_SIZE = 2
 

Detailed Description

crc implementation based on U_I

Definition at line 114 of file crc.hpp.

Constructor & Destructor Documentation

◆ crc_n()

libdar::crc_n::crc_n ( const crc_n ref)
inline

Definition at line 120 of file crc.hpp.

◆ ~crc_n()

libdar::crc_n::~crc_n ( )
inline

Definition at line 124 of file crc.hpp.

Member Function Documentation

◆ clear()

virtual void libdar::crc_n::clear ( )
overridevirtual

Implements libdar::crc.

◆ clone()

virtual crc * libdar::crc_n::clone ( ) const
inlineoverrideprotectedvirtual

Implements libdar::crc.

Definition at line 136 of file crc.hpp.

◆ compute() [1/2]

virtual void libdar::crc_n::compute ( const char *  buffer,
U_I  length 
)
overridevirtual

Implements libdar::crc.

◆ compute() [2/2]

virtual void libdar::crc_n::compute ( const infinint offset,
const char *  buffer,
U_I  length 
)
overridevirtual

Implements libdar::crc.

◆ crc2str()

virtual std::string libdar::crc_n::crc2str ( ) const
overridevirtual

Implements libdar::crc.

◆ dump()

virtual void libdar::crc_n::dump ( proto_generic_file f) const
overridevirtual

Implements libdar::crc.

◆ get_size()

virtual infinint libdar::crc_n::get_size ( ) const
inlineoverridevirtual

Implements libdar::crc.

Definition at line 133 of file crc.hpp.

◆ operator==()

bool libdar::crc_n::operator== ( const crc ref) const
overridevirtual

Implements libdar::crc.

Member Data Documentation

◆ cyclic

unsigned char* libdar::crc_n::cyclic
private

the checksum storage (non infinint mode)

Definition at line 142 of file crc.hpp.

◆ pointer

unsigned char* libdar::crc_n::pointer
private

points to the next byte to modify (non infinint mode)

Definition at line 141 of file crc.hpp.

◆ size

U_I libdar::crc_n::size
private

size of checksum (non infinint mode)

Definition at line 140 of file crc.hpp.


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