#include <script.h>
|
static std::vector< unsigned char > | serialize (const int64_t &value) |
|
|
static int64_t | set_vch (const std::vector< unsigned char > &vch) |
|
Definition at line 226 of file script.h.
◆ CScriptNum() [1/2]
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 238 of file script.h.
◆ CScriptNum() [2/2]
CScriptNum::CScriptNum |
( |
const std::vector< unsigned char > & |
vch, |
|
|
bool |
fRequireMinimal, |
|
|
const size_t |
nMaxNumSize = nDefaultMaxNumSize |
|
) |
| |
|
inlineexplicit |
◆ getint()
int CScriptNum::getint |
( |
| ) |
const |
|
inline |
◆ GetInt64()
int64_t CScriptNum::GetInt64 |
( |
| ) |
const |
|
inline |
◆ getvch()
std::vector< unsigned char > CScriptNum::getvch |
( |
| ) |
const |
|
inline |
◆ operator!=() [1/2]
bool CScriptNum::operator!= |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
◆ operator!=() [2/2]
bool CScriptNum::operator!= |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator&() [1/2]
◆ operator&() [2/2]
CScriptNum CScriptNum::operator& |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator&=() [1/2]
◆ operator&=() [2/2]
CScriptNum & CScriptNum::operator&= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
◆ operator+() [1/2]
◆ operator+() [2/2]
CScriptNum CScriptNum::operator+ |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator+=() [1/2]
◆ operator+=() [2/2]
CScriptNum & CScriptNum::operator+= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
◆ operator-() [1/3]
◆ operator-() [2/3]
◆ operator-() [3/3]
CScriptNum CScriptNum::operator- |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator-=() [1/2]
◆ operator-=() [2/2]
CScriptNum & CScriptNum::operator-= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
◆ operator<() [1/2]
bool CScriptNum::operator< |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
◆ operator<() [2/2]
bool CScriptNum::operator< |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator<=() [1/2]
bool CScriptNum::operator<= |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
◆ operator<=() [2/2]
bool CScriptNum::operator<= |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator=()
CScriptNum & CScriptNum::operator= |
( |
const int64_t & |
rhs | ) |
|
|
inline |
◆ operator==() [1/2]
bool CScriptNum::operator== |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
◆ operator==() [2/2]
bool CScriptNum::operator== |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator>() [1/2]
bool CScriptNum::operator> |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
◆ operator>() [2/2]
bool CScriptNum::operator> |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ operator>=() [1/2]
bool CScriptNum::operator>= |
( |
const CScriptNum & |
rhs | ) |
const |
|
inline |
◆ operator>=() [2/2]
bool CScriptNum::operator>= |
( |
const int64_t & |
rhs | ) |
const |
|
inline |
◆ serialize()
static std::vector< unsigned char > CScriptNum::serialize |
( |
const int64_t & |
value | ) |
|
|
inlinestatic |
◆ set_vch()
static int64_t CScriptNum::set_vch |
( |
const std::vector< unsigned char > & |
vch | ) |
|
|
inlinestaticprivate |
◆ m_value
int64_t CScriptNum::m_value |
|
private |
◆ nDefaultMaxNumSize
const size_t CScriptNum::nDefaultMaxNumSize = 4 |
|
static |
The documentation for this class was generated from the following file: