Bitcoin ABC 0.33.12
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Protected Attributes | Static 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

constexpr base_blob ()
 
constexpr base_blob (uint8_t v)
 
constexpr base_blob (Span< const uint8_t > vch)
 
constexpr bool IsNull () const
 
constexpr void SetNull ()
 
constexpr int Compare (const base_blob &other) const
 
std::string GetHex () const
 
void SetHex (const char *psz)
 
void SetHex (const std::string &str)
 
std::string ToString () const
 
constexpr const uint8_t * data () const
 
constexpr uint8_t * data ()
 
constexpr uint8_t * begin ()
 
constexpr uint8_t * end ()
 
constexpr const uint8_t * begin () const
 
constexpr const uint8_t * end () const
 
constexpr uint64_t GetUint64 (int pos) const
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 

Static Public Member Functions

static constexpr unsigned int size ()
 

Protected Attributes

std::array< uint8_t, WIDTHm_data
 

Static Protected Attributes

static constexpr int WIDTH = BITS / 8
 

Friends

constexpr bool operator== (const base_blob &a, const base_blob &b)
 
constexpr bool operator!= (const base_blob &a, const base_blob &b)
 
constexpr bool operator< (const base_blob &a, const base_blob &b)
 
constexpr bool operator<= (const base_blob &a, const base_blob &b)
 
constexpr bool operator> (const base_blob &a, const base_blob &b)
 
constexpr 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 20 of file uint256.h.

Constructor & Destructor Documentation

◆ base_blob() [1/3]

template<unsigned int BITS>
constexpr base_blob< BITS >::base_blob ( )
inlineconstexpr

Definition at line 30 of file uint256.h.

◆ base_blob() [2/3]

template<unsigned int BITS>
constexpr base_blob< BITS >::base_blob ( uint8_t  v)
inlineexplicitconstexpr

Definition at line 33 of file uint256.h.

◆ base_blob() [3/3]

template<unsigned int BITS>
constexpr base_blob< BITS >::base_blob ( Span< const uint8_t >  vch)
inlineexplicitconstexpr

Definition at line 35 of file uint256.h.

Here is the call graph for this function:

Member Function Documentation

◆ begin() [1/2]

template<unsigned int BITS>
constexpr uint8_t * base_blob< BITS >::begin ( )
inlineconstexpr

Definition at line 89 of file uint256.h.

Here is the caller graph for this function:

◆ begin() [2/2]

template<unsigned int BITS>
constexpr const uint8_t * base_blob< BITS >::begin ( ) const
inlineconstexpr

Definition at line 92 of file uint256.h.

◆ Compare()

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

Definition at line 47 of file uint256.h.

◆ data() [1/2]

template<unsigned int BITS>
constexpr uint8_t * base_blob< BITS >::data ( )
inlineconstexpr

Definition at line 87 of file uint256.h.

◆ data() [2/2]

template<unsigned int BITS>
constexpr const uint8_t * base_blob< BITS >::data ( ) const
inlineconstexpr

Definition at line 86 of file uint256.h.

Here is the caller graph for this function:

◆ end() [1/2]

template<unsigned int BITS>
constexpr uint8_t * base_blob< BITS >::end ( )
inlineconstexpr

Definition at line 90 of file uint256.h.

Here is the caller graph for this function:

◆ end() [2/2]

template<unsigned int BITS>
constexpr const uint8_t * base_blob< BITS >::end ( ) const
inlineconstexpr

Definition at line 93 of file uint256.h.

◆ GetHex()

template<unsigned int BITS>
std::string base_blob< BITS >::GetHex

Definition at line 10 of file uint256.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUint64()

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

Definition at line 97 of file uint256.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsNull()

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

Definition at line 40 of file uint256.h.

Here is the caller graph for this function:

◆ Serialize()

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

Definition at line 101 of file uint256.h.

Here is the call graph for this function:

◆ SetHex() [1/2]

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

Definition at line 18 of file uint256.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetHex() [2/2]

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

Definition at line 49 of file uint256.cpp.

◆ SetNull()

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

Definition at line 45 of file uint256.h.

Here is the caller graph for this function:

◆ size()

template<unsigned int BITS>
static constexpr unsigned int base_blob< BITS >::size ( )
inlinestaticconstexpr

Definition at line 95 of file uint256.h.

Here is the caller graph for this function:

◆ ToString()

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

Definition at line 84 of file uint256.h.

◆ Unserialize()

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

Definition at line 105 of file uint256.h.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 65 of file uint256.h.

◆ operator<

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

Definition at line 68 of file uint256.h.

◆ operator<=

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

Definition at line 71 of file uint256.h.

◆ operator==

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

Definition at line 62 of file uint256.h.

◆ operator>

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

Definition at line 74 of file uint256.h.

◆ operator>=

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

Definition at line 77 of file uint256.h.

Member Data Documentation

◆ m_data

template<unsigned int BITS>
std::array<uint8_t, WIDTH> base_blob< BITS >::m_data
protected

Definition at line 25 of file uint256.h.

◆ WIDTH

template<unsigned int BITS>
constexpr int base_blob< BITS >::WIDTH = BITS / 8
staticconstexprprotected

Definition at line 22 of file uint256.h.


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