Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Types | Protected Attributes | Friends | List of all members
base_uint< BITS > Class Template Reference

Base class without constructors for uint256 and uint160. More...

#include <uint256.h>

+ Inheritance diagram for base_uint< BITS >:
+ Collaboration diagram for base_uint< BITS >:

Public Member Functions

bool operator! () const
 
const base_uint operator~ () const
 
const base_uint operator- () const
 
double getdouble () const
 
base_uintoperator= (uint64_t b)
 
base_uintoperator^= (const base_uint &b)
 
base_uintoperator&= (const base_uint &b)
 
base_uintoperator|= (const base_uint &b)
 
base_uintoperator^= (uint64_t b)
 
base_uintoperator|= (uint64_t b)
 
base_uintoperator<<= (unsigned int shift)
 
base_uintoperator>>= (unsigned int shift)
 
base_uintoperator+= (const base_uint &b)
 
base_uintoperator-= (const base_uint &b)
 
base_uintoperator+= (uint64_t b64)
 
base_uintoperator-= (uint64_t b64)
 
base_uintoperator++ ()
 
const base_uint operator++ (int)
 
base_uintoperator-- ()
 
const base_uint operator-- (int)
 
std::string GetHex () const
 
void SetHex (const char *psz)
 
void SetHex (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 GetLow64 () const
 
unsigned int GetSerializeSize (int nType, int nVersion) const
 
template<typename Stream >
void Serialize (Stream &s, int nType, int nVersion) const
 
template<typename Stream >
void Unserialize (Stream &s, int nType, int nVersion)
 

Protected Types

enum  { WIDTH =BITS/32 }
 

Protected Attributes

uint32_t pn [WIDTH]
 

Friends

class uint160
 
class uint256
 
bool operator< (const base_uint &a, const base_uint &b)
 
bool operator<= (const base_uint &a, const base_uint &b)
 
bool operator> (const base_uint &a, const base_uint &b)
 
bool operator>= (const base_uint &a, const base_uint &b)
 
bool operator== (const base_uint &a, const base_uint &b)
 
bool operator== (const base_uint &a, uint64_t b)
 
bool operator!= (const base_uint &a, const base_uint &b)
 
bool operator!= (const base_uint &a, uint64_t b)
 

Detailed Description

template<unsigned int BITS>
class base_uint< BITS >

Base class without constructors for uint256 and uint160.

This makes the compiler let you use it in a union.

Definition at line 26 of file uint256.h.

Member Enumeration Documentation

template<unsigned int BITS>
anonymous enum
protected
Enumerator
WIDTH 

Definition at line 29 of file uint256.h.

Member Function Documentation

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

Definition at line 345 of file uint256.h.

Referenced by CBloomFilter::contains().

+ Here is the caller graph for this function:

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

Definition at line 355 of file uint256.h.

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

Definition at line 350 of file uint256.h.

References base_uint< BITS >::WIDTH.

Referenced by CBloomFilter::contains().

+ Here is the caller graph for this function:

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

Definition at line 360 of file uint256.h.

References base_uint< BITS >::WIDTH.

template<unsigned int BITS>
double base_uint< BITS >::getdouble ( ) const
inline

Definition at line 58 of file uint256.h.

References base_uint< BITS >::WIDTH.

Referenced by GetNetworkHashPS(), InvalidChainFound(), and UpdateTip().

+ Here is the caller graph for this function:

template<unsigned int BITS>
std::string base_uint< BITS >::GetHex ( ) const
inline
template<unsigned int BITS>
uint64_t base_uint< BITS >::GetLow64 ( ) const
inline

Definition at line 370 of file uint256.h.

References base_uint< BITS >::WIDTH.

template<unsigned int BITS>
unsigned int base_uint< BITS >::GetSerializeSize ( int  nType,
int  nVersion 
) const
inline

Definition at line 377 of file uint256.h.

References base_uint< BITS >::pn.

template<unsigned int BITS>
bool base_uint< BITS >::operator! ( ) const
inline

Definition at line 33 of file uint256.h.

References base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator&= ( const base_uint< BITS > &  b)
inline

Definition at line 85 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator++ ( )
inline

Definition at line 182 of file uint256.h.

References base_uint< BITS >::WIDTH.

template<unsigned int BITS>
const base_uint base_uint< BITS >::operator++ ( int  )
inline

Definition at line 191 of file uint256.h.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator+= ( const base_uint< BITS > &  b)
inline

Definition at line 147 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator+= ( uint64_t  b64)
inline

Definition at line 165 of file uint256.h.

template<unsigned int BITS>
const base_uint base_uint< BITS >::operator- ( ) const
inline

Definition at line 49 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator-- ( )
inline

Definition at line 199 of file uint256.h.

References base_uint< BITS >::WIDTH.

template<unsigned int BITS>
const base_uint base_uint< BITS >::operator-- ( int  )
inline

Definition at line 208 of file uint256.h.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator-= ( const base_uint< BITS > &  b)
inline

Definition at line 159 of file uint256.h.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator-= ( uint64_t  b64)
inline

Definition at line 173 of file uint256.h.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator<<= ( unsigned int  shift)
inline

Definition at line 113 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator= ( uint64_t  b)
inline

Definition at line 69 of file uint256.h.

References base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator>>= ( unsigned int  shift)
inline

Definition at line 130 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator^= ( const base_uint< BITS > &  b)
inline

Definition at line 78 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator^= ( uint64_t  b)
inline

Definition at line 99 of file uint256.h.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator|= ( const base_uint< BITS > &  b)
inline

Definition at line 92 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
base_uint& base_uint< BITS >::operator|= ( uint64_t  b)
inline

Definition at line 106 of file uint256.h.

template<unsigned int BITS>
const base_uint base_uint< BITS >::operator~ ( ) const
inline

Definition at line 41 of file uint256.h.

References base_uint< BITS >::pn, and base_uint< BITS >::WIDTH.

template<unsigned int BITS>
template<typename Stream >
void base_uint< BITS >::Serialize ( Stream &  s,
int  nType,
int  nVersion 
) const
inline

Definition at line 384 of file uint256.h.

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

Definition at line 305 of file uint256.h.

References HexDigit(), and base_uint< BITS >::WIDTH.

Referenced by CMPTxList::findMetaDExCancel(), getsto_MP(), gettrade_MP(), gettransaction(), gettransaction_MP(), CMPSPInfo::getWatermark(), listsinceblock(), listtransactions_MP(), load_most_relevant_state(), ParseHashV(), prune_state_files(), base_uint< BITS >::SetHex(), CMPTxList::setLastAlert(), uint160::uint160(), uint256::uint256(), ClientModel::updateAlert(), and TransactionTableModel::updateTransaction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 335 of file uint256.h.

References base_uint< BITS >::SetHex().

+ Here is the call graph for this function:

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

Definition at line 365 of file uint256.h.

References base_uint< BITS >::pn.

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

Definition at line 340 of file uint256.h.

References base_uint< BITS >::GetHex().

Referenced by AcceptToMemoryPool(), AddOrphanTx(), AddToBlockIndex(), CWallet::AddToWallet(), AppInit2(), CheckForkWarningConditions(), CheckInputs(), ConnectTip(), CreateNewBlock(), TransactionTableModel::data(), DisconnectTip(), dumpwallet(), CMPTxList::exists(), CMPTxList::findMetaDExCancel(), CMPSPInfo::findSPByTX(), TransactionRecord::formatSubTxId(), CMPTradeList::getMatchingTrades(), GetNextWorkRequired(), CMPTxList::getNumberOfMetaDExCancels(), CMPTxList::getNumberOfPurchases(), CMPTxList::getPurchaseDetails(), getrawmempool(), CMPSTOList::getRecipients(), gettrade_MP(), CMPTxList::getTX(), InvalidChainFound(), load_most_relevant_state(), LoadBlockIndexDB(), msc_file_load(), CMPSPInfo::popBlock(), COrphan::print(), CBlock::print(), ProcessBlock(), ProcessMessage(), CMPSPInfo::putSP(), CMPTxList::recordMetaDExCancelTX(), CMPTxList::recordPaymentTX(), CMPSTOList::recordSTOReceive(), CMPTradeList::recordTrade(), CMPTxList::recordTX(), CWalletTx::RelayWalletTransaction(), CMPAccept::saveAccept(), CMPOffer::saveOffer(), selectCoins(), SendMessages(), CMPSPInfo::setWatermark(), CMPSPInfo::Entry::toJSON(), COutPoint::ToString(), CInv::ToString(), COutput::ToString(), CBlockIndex::ToString(), CDiskBlockIndex::ToString(), TXExodusFundraiser(), CMPSPInfo::updateSP(), UpdateTip(), TransactionTablePriv::updateWallet(), VerifyDB(), and write_state_file().

+ 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_uint< BITS >::Unserialize ( Stream &  s,
int  nType,
int  nVersion 
)
inline

Definition at line 391 of file uint256.h.

Friends And Related Function Documentation

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

Definition at line 285 of file uint256.h.

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

Definition at line 290 of file uint256.h.

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

Definition at line 217 of file uint256.h.

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

Definition at line 229 of file uint256.h.

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

Definition at line 265 of file uint256.h.

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

Definition at line 273 of file uint256.h.

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

Definition at line 241 of file uint256.h.

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

Definition at line 253 of file uint256.h.

template<unsigned int BITS>
friend class uint160
friend

Definition at line 397 of file uint256.h.

template<unsigned int BITS>
friend class uint256
friend

Definition at line 398 of file uint256.h.

Member Data Documentation

template<unsigned int BITS>
uint32_t base_uint< BITS >::pn[WIDTH]
protected

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