Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Protected Types | Protected Attributes | Friends | List of all members
base_blob< BITS > Class Template Reference

Template base class for fixed-sized opaque blobs. More...

#include <uint256.h>

Public Member Functions

 base_blob ()
 
 base_blob (const std::vector< unsigned char > &vch)
 
bool IsNull () const
 
void SetNull ()
 
int Compare (const base_blob &other) const
 
std::string GetHex () const
 
std::string GetReverseHex () const
 
void SetHex (const char *psz)
 
void SetHex (const std::string &str)
 
void SetReverseHex (const char *psz)
 
void SetReverseHex (const std::string &str)
 
std::string ToString () const
 
unsigned char * begin ()
 
unsigned char * end ()
 
const unsigned char * begin () const
 
const unsigned char * end () const
 
unsigned int size () const
 
uint64_t GetUint64 (int pos) const
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 

Protected Types

enum  { WIDTH =BITS/8 }
 

Protected Attributes

uint8_t data [WIDTH]
 

Friends

bool operator== (const base_blob &a, const base_blob &b)
 
bool operator!= (const base_blob &a, const base_blob &b)
 
bool operator< (const base_blob &a, const base_blob &b)
 

Detailed Description

template<unsigned int BITS>
class base_blob< BITS >

Template base class for fixed-sized opaque blobs.

Definition at line 25 of file uint256.h.

Member Enumeration Documentation

template<unsigned int BITS>
anonymous enum
protected
Enumerator
WIDTH 

Definition at line 28 of file uint256.h.

Constructor & Destructor Documentation

template<unsigned int BITS>
base_blob< BITS >::base_blob ( )
inline

Definition at line 31 of file uint256.h.

Here is the caller graph for this function:

template<unsigned int BITS>
base_blob< BITS >::base_blob ( const std::vector< unsigned char > &  vch)
explicit

Definition at line 14 of file uint256.cpp.

Here is the call graph for this function:

Member Function Documentation

template<unsigned int BITS>
unsigned char* base_blob< BITS >::begin ( void  )
inline

Definition at line 65 of file uint256.h.

Here is the caller graph for this function:

template<unsigned int BITS>
const unsigned char* base_blob< BITS >::begin ( void  ) const
inline

Definition at line 75 of file uint256.h.

template<unsigned int BITS>
int base_blob< BITS >::Compare ( const base_blob< BITS > &  other) const
inline

Definition at line 51 of file uint256.h.

template<unsigned int BITS>
unsigned char* base_blob< BITS >::end ( void  )
inline

Definition at line 70 of file uint256.h.

Here is the caller graph for this function:

template<unsigned int BITS>
const unsigned char* base_blob< BITS >::end ( void  ) const
inline

Definition at line 80 of file uint256.h.

template<unsigned int BITS>
std::string base_blob< BITS >::GetHex ( ) const

Definition at line 21 of file uint256.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned int BITS>
std::string base_blob< BITS >::GetReverseHex ( ) const

Definition at line 27 of file uint256.cpp.

Here is the caller graph for this function:

template<unsigned int BITS>
uint64_t base_blob< BITS >::GetUint64 ( int  pos) const
inline

Definition at line 90 of file uint256.h.

Here is the caller graph for this function:

template<unsigned int BITS>
bool base_blob< BITS >::IsNull ( ) const
inline

Definition at line 38 of file uint256.h.

Here is the caller graph for this function:

template<unsigned int BITS>
template<typename Stream >
void base_blob< BITS >::Serialize ( Stream &  s) const
inline

Definition at line 104 of file uint256.h.

template<unsigned int BITS>
void base_blob< BITS >::SetHex ( const char *  psz)

Definition at line 39 of file uint256.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned int BITS>
void base_blob< BITS >::SetHex ( const std::string &  str)

Definition at line 68 of file uint256.cpp.

template<unsigned int BITS>
void base_blob< BITS >::SetNull ( )
inline

Definition at line 46 of file uint256.h.

Here is the caller graph for this function:

template<unsigned int BITS>
void base_blob< BITS >::SetReverseHex ( const char *  psz)

Definition at line 74 of file uint256.cpp.

Here is the caller graph for this function:

template<unsigned int BITS>
void base_blob< BITS >::SetReverseHex ( const std::string &  str)

Definition at line 89 of file uint256.cpp.

template<unsigned int BITS>
unsigned int base_blob< BITS >::size ( void  ) const
inline

Definition at line 85 of file uint256.h.

Here is the caller graph for this function:

template<unsigned int BITS>
std::string base_blob< BITS >::ToString ( ) const

Definition at line 95 of file uint256.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned int BITS>
template<typename Stream >
void base_blob< BITS >::Unserialize ( Stream &  s)
inline

Definition at line 110 of file uint256.h.

Friends And Related Function Documentation

template<unsigned int BITS>
bool operator!= ( const base_blob< BITS > &  a,
const base_blob< BITS > &  b 
)
friend

Definition at line 54 of file uint256.h.

template<unsigned int BITS>
bool operator< ( const base_blob< BITS > &  a,
const base_blob< BITS > &  b 
)
friend

Definition at line 55 of file uint256.h.

template<unsigned int BITS>
bool operator== ( const base_blob< BITS > &  a,
const base_blob< BITS > &  b 
)
friend

Definition at line 53 of file uint256.h.

Member Data Documentation

template<unsigned int BITS>
uint8_t base_blob< BITS >::data[WIDTH]
protected

Definition at line 29 of file uint256.h.


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