adchpp::CID Class Reference

#include <CID.h>

Collaboration diagram for adchpp::CID:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { SIZE = 192 / 8 }
enum  { BASE32_SIZE = 39 }

Public Member Functions

 CID (const CID &rhs)
 CID (const std::string &base32)
 CID (const uint8_t *data)
 CID ()
const uint8_t * data () const
bool isZero () const
bool operator< (const CID &rhs) const
CIDoperator= (const CID &rhs)
bool operator== (const CID &rhs) const
std::string & toBase32 (std::string &tmp) const
std::string toBase32 () const
size_t toHash () const

Static Public Member Functions

static CID generate ()

Private Attributes

union {
   uint8_t   cid [SIZE]
   size_t   cidHash
}; 

Detailed Description

Definition at line 27 of file CID.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
SIZE 

Definition at line 29 of file CID.h.

anonymous enum
Enumerator:
BASE32_SIZE 

Definition at line 30 of file CID.h.


Constructor & Destructor Documentation

adchpp::CID::CID (  )  [inline]

Definition at line 32 of file CID.h.

References cid.

Referenced by generate().

Here is the caller graph for this function:

adchpp::CID::CID ( const uint8_t *  data  )  [inline, explicit]

Definition at line 33 of file CID.h.

References cid.

adchpp::CID::CID ( const std::string &  base32  )  [inline, explicit]

Definition at line 34 of file CID.h.

References cid, and adchpp::Encoder::fromBase32().

Here is the call graph for this function:

adchpp::CID::CID ( const CID rhs  )  [inline]

Definition at line 36 of file CID.h.

References cid.


Member Function Documentation

const uint8_t* adchpp::CID::data (  )  const [inline]

Definition at line 46 of file CID.h.

References cid.

Referenced by generate(), and adchpp::ClientManager::verifyCID().

Here is the caller graph for this function:

static CID adchpp::CID::generate (  )  [inline, static]

Definition at line 50 of file CID.h.

References CID(), data(), adchpp::Util::rand(), and SIZE.

Referenced by adchpp::Bot::Bot().

Here is the call graph for this function:

Here is the caller graph for this function:

bool adchpp::CID::isZero (  )  const [inline]

Definition at line 48 of file CID.h.

References cid, and SIZE.

bool adchpp::CID::operator< ( const CID rhs  )  const [inline]

Definition at line 40 of file CID.h.

References cid.

CID& adchpp::CID::operator= ( const CID rhs  )  [inline]

Definition at line 37 of file CID.h.

References cid.

bool adchpp::CID::operator== ( const CID rhs  )  const [inline]

Definition at line 39 of file CID.h.

References cid.

std::string& adchpp::CID::toBase32 ( std::string &  tmp  )  const [inline]

Definition at line 43 of file CID.h.

References cid, and toBase32().

Here is the call graph for this function:

std::string adchpp::CID::toBase32 (  )  const [inline]

Definition at line 42 of file CID.h.

References cid.

Referenced by toBase32().

Here is the caller graph for this function:

size_t adchpp::CID::toHash (  )  const [inline]

Definition at line 45 of file CID.h.

References cid, and cidHash.

Referenced by std::hash< adchpp::CID >::operator()().

Here is the caller graph for this function:


Member Data Documentation

union { ... } [private]
uint8_t adchpp::CID::cid[SIZE]

Definition at line 60 of file CID.h.

Referenced by CID(), data(), isZero(), operator<(), operator=(), operator==(), toBase32(), and toHash().

Definition at line 61 of file CID.h.

Referenced by toHash().

Generated on Sat Nov 27 23:38:32 2010 for adchpp by  doxygen 1.6.3