HashBase Class Reference

#include <hash.h>

Inheritance diagram for HashBase:

Inheritance graph
[legend]
List of all members.

Detailed Description

Abstract base for hash.

Definition at line 101 of file hash.h.


Public Member Functions

 HashBase ()
virtual ~HashBase ()
virtual uint16_t size () const =0
virtual boost::shared_array<
char > 
getData () const =0
virtual std::string getType () const =0
virtual CGComm::HashTypeId getTypeId () const =0
bool isEmpty () const
virtual std::string decode () const
bool operator== (const HashBase &h) const
 Comparison operator.
bool operator!= (const HashBase &h) const
 operator bool () const
 Comparison operator to bool.

Friends

DLLEXPORT std::ostream & operator<< (std::ostream &o, const HashBase &h)
 Output operator for streams.
bool operator< (const HashBase &x, const HashBase &y)

Constructor & Destructor Documentation

HashBase::HashBase  ) 
 

Definition at line 141 of file hash.cpp.

HashBase::~HashBase  )  [virtual]
 

Definition at line 142 of file hash.cpp.


Member Function Documentation

virtual std::string HashBase::decode  )  const [inline, virtual]
 

Definition at line 111 of file hash.h.

References Utils::decode().

Referenced by HashSetBase::compare(), HashWork::finish(), and PartData::onHashEvent().

Here is the call graph for this function:

virtual boost::shared_array<char> HashBase::getData  )  const [pure virtual]
 

Implemented in Hash< HashType >, Hash< FileHashType >, and Hash< MD4Hash >.

virtual std::string HashBase::getType  )  const [pure virtual]
 

Implemented in Hash< HashType >, Hash< FileHashType >, and Hash< MD4Hash >.

virtual CGComm::HashTypeId HashBase::getTypeId  )  const [pure virtual]
 

Implemented in Hash< HashType >, Hash< FileHashType >, and Hash< MD4Hash >.

Referenced by MetaDb::tryAddHashSet().

bool HashBase::isEmpty  )  const [inline]
 

Definition at line 109 of file hash.h.

Referenced by HashSet< HashType, FileHashType, ChunkSize >::HashSet().

HashBase::operator bool  )  const [inline]
 

Comparison operator to bool.

Reimplemented in Hash< HashType >, Hash< FileHashType >, and Hash< MD4Hash >.

Definition at line 158 of file hash.h.

bool HashBase::operator!= const HashBase h  )  const [inline]
 

Definition at line 138 of file hash.h.

bool HashBase::operator== const HashBase h  )  const [inline]
 

Comparison operator.

Definition at line 124 of file hash.h.

virtual uint16_t HashBase::size  )  const [pure virtual]
 

Implemented in Hash< HashType >, Hash< FileHashType >, and Hash< MD4Hash >.


Friends And Related Function Documentation

bool operator< const HashBase x,
const HashBase y
[friend]
 

Definition at line 142 of file hash.h.

DLLEXPORT std::ostream& operator<< std::ostream &  o,
const HashBase h
[friend]
 

Output operator for streams.

Definition at line 144 of file hash.cpp.


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