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_i Class Reference

crc implementation based on infinint More...

#include <crc.hpp>

+ Inheritance diagram for libdar::crc_i:
+ Collaboration diagram for libdar::crc_i:

Public Member Functions

 crc_i (const infinint &width)
 
 crc_i (const infinint &width, proto_generic_file &f)
 
 crc_i (const crc_i &ref)
 
 crc_i (crc_i &&ref) noexcept=default
 
crc_ioperator= (const crc_i &ref)
 
crc_ioperator= (crc_i &&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 copy_from (const crc_i &ref)
 
void copy_data_from (const crc_i &ref)
 

Private Attributes

infinint size
 size of the checksum More...
 
storage::iterator pointer
 points to the next byte to modify More...
 
storage cyclic
 the checksum storage 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 infinint

Definition at line 78 of file crc.hpp.

Constructor & Destructor Documentation

◆ crc_i()

libdar::crc_i::crc_i ( const crc_i ref)
inline

Definition at line 83 of file crc.hpp.

Member Function Documentation

◆ clear()

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

Implements libdar::crc.

◆ clone()

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

Implements libdar::crc.

Definition at line 99 of file crc.hpp.

◆ compute() [1/2]

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

Implements libdar::crc.

◆ compute() [2/2]

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

Implements libdar::crc.

◆ crc2str()

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

Implements libdar::crc.

◆ dump()

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

Implements libdar::crc.

◆ get_size()

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

Implements libdar::crc.

Definition at line 96 of file crc.hpp.

◆ operator=()

crc_i & libdar::crc_i::operator= ( const crc_i ref)
inline

Definition at line 85 of file crc.hpp.

◆ operator==()

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

Implements libdar::crc.

Member Data Documentation

◆ cyclic

storage libdar::crc_i::cyclic
private

the checksum storage

Definition at line 105 of file crc.hpp.

◆ pointer

storage::iterator libdar::crc_i::pointer
private

points to the next byte to modify

Definition at line 104 of file crc.hpp.

◆ size

infinint libdar::crc_i::size
private

size of the checksum

Definition at line 103 of file crc.hpp.


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