#include <script.h>
|
static uint64_t | vch_to_uint64 (const std::vector< unsigned char > &vch) |
|
static std::vector< unsigned char > | serialize (const int64_t &value) |
|
|
static int64_t | set_vch (const std::vector< unsigned char > &vch) |
|
Definition at line 215 of file script.h.
CScriptNum::CScriptNum |
( |
const int64_t & |
n | ) |
|
|
inlineexplicit |
Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1], but results may overflow (and are valid as long as they are not used in a subsequent numeric operation). CScriptNum enforces those semantics by storing results as an int64 and allowing out-of-range values to be returned as a vector of bytes but throwing an exception if arithmetic is done or the result is interpreted as an integer.
Definition at line 227 of file script.h.
CScriptNum::CScriptNum |
( |
const std::vector< unsigned char > & |
vch, |
|
|
bool |
fRequireMinimal, |
|
|
const size_t |
nMaxNumSize = nDefaultMaxNumSize |
|
) |
| |
|
inlineexplicit |
int CScriptNum::getint |
( |
| ) |
const |
|
inline |
std::vector<unsigned char> CScriptNum::getvch |
( |
| ) |
const |
|
inline |
bool CScriptNum::operator!= |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator!= |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
CScriptNum CScriptNum::operator& |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
CScriptNum& CScriptNum::operator&= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
CScriptNum CScriptNum::operator+ |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
CScriptNum& CScriptNum::operator+= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
CScriptNum CScriptNum::operator- |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
CScriptNum& CScriptNum::operator-= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
bool CScriptNum::operator< |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator< |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator<= |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator<= |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
CScriptNum& CScriptNum::operator= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
bool CScriptNum::operator== |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator== |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator> |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator> |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator>= |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
bool CScriptNum::operator>= |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
static std::vector<unsigned char> CScriptNum::serialize |
( |
const int64_t & |
value | ) |
|
|
inlinestatic |
static int64_t CScriptNum::set_vch |
( |
const std::vector< unsigned char > & |
vch | ) |
|
|
inlinestaticprivate |
static uint64_t CScriptNum::vch_to_uint64 |
( |
const std::vector< unsigned char > & |
vch | ) |
|
|
inlinestatic |
int64_t CScriptNum::m_value |
|
private |
const size_t CScriptNum::nDefaultMaxNumSize = 4 |
|
static |
The documentation for this class was generated from the following file: