Hash< HashType > Class Template Reference

#include <hash.h>

Inheritance diagram for Hash< HashType >:

Inheritance graph
[legend]
Collaboration diagram for Hash< HashType >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename HashType>
class Hash< HashType >

Concrete implementation for Hash.

Definition at line 163 of file hash.h.


Operations

bool operator== (const Hash &h) const
bool operator!= (const Hash &h) const
 operator bool () const
 Comparison operator to bool.
bool operator< (const Hash &x, const Hash &y)

Public Member Functions

 Hash ()
 Default constructor.
 Hash (std::istream &i)
 Construct and read from stream.
 Hash (const char *data)
 Construct from character array.
 Hash (const unsigned char *data)
 Hash (const boost::shared_array< char > &data)
 Hash (const char *data, uint16_t length)
 Construct from character array and size - asserts if length != HashType::size().
 Hash (const unsigned char *data, uint16_t length)
 Hash (const std::string &data)
 Hash (const boost::shared_array< char > *data)
 ~Hash ()
 Destructor.
void clear ()
 Clear the contents of this hash.
uint16_t size () const
boost::shared_array< char > getData () const
std::string getType () const
CGComm::HashTypeId getTypeId () const

Private Attributes

boost::shared_array< char > m_data
 Internal data storage.

Constructor & Destructor Documentation

template<typename HashType>
Hash< HashType >::Hash  )  [inline]
 

Default constructor.

Definition at line 166 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash std::istream &  i  )  [inline]
 

Construct and read from stream.

Definition at line 168 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash const char *  data  )  [inline]
 

Construct from character array.

Definition at line 174 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash const unsigned char *  data  )  [inline]
 

Definition at line 178 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash const boost::shared_array< char > &  data  )  [inline]
 

Definition at line 182 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash const char *  data,
uint16_t  length
[inline]
 

Construct from character array and size - asserts if length != HashType::size().

Definition at line 186 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash const unsigned char *  data,
uint16_t  length
[inline]
 

Definition at line 191 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash const std::string &  data  )  [inline]
 

Definition at line 196 of file hash.h.

template<typename HashType>
Hash< HashType >::Hash const boost::shared_array< char > *  data  )  [inline]
 

Definition at line 201 of file hash.h.

template<typename HashType>
Hash< HashType >::~Hash  )  [inline]
 

Destructor.

Definition at line 204 of file hash.h.


Member Function Documentation

template<typename HashType>
void Hash< HashType >::clear  )  [inline]
 

Clear the contents of this hash.

Definition at line 219 of file hash.h.

template<typename HashType>
boost::shared_array<char> Hash< HashType >::getData  )  const [inline, virtual]
 

Implements HashBase.

Definition at line 211 of file hash.h.

Referenced by ED2KHashMaker::getHashSet().

template<typename HashType>
std::string Hash< HashType >::getType  )  const [inline, virtual]
 

Implements HashBase.

Definition at line 212 of file hash.h.

template<typename HashType>
CGComm::HashTypeId Hash< HashType >::getTypeId  )  const [inline, virtual]
 

Implements HashBase.

Definition at line 213 of file hash.h.

template<typename HashType>
Hash< HashType >::operator bool  )  const [inline]
 

Comparison operator to bool.

Reimplemented from HashBase.

Definition at line 239 of file hash.h.

template<typename HashType>
bool Hash< HashType >::operator!= const Hash< HashType > &  h  )  const [inline]
 

Definition at line 230 of file hash.h.

template<typename HashType>
bool Hash< HashType >::operator== const Hash< HashType > &  h  )  const [inline]
 

Definition at line 223 of file hash.h.

template<typename HashType>
uint16_t Hash< HashType >::size  )  const [inline, virtual]
 

Implements HashBase.

Definition at line 210 of file hash.h.

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


Friends And Related Function Documentation

template<typename HashType>
bool operator< const Hash< HashType > &  x,
const Hash< HashType > &  y
[friend]
 

Definition at line 241 of file hash.h.


Member Data Documentation

template<typename HashType>
boost::shared_array<char> Hash< HashType >::m_data [private]
 

Internal data storage.

Definition at line 254 of file hash.h.


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