#include <script.h>
|
static int64_t | set_vch (const std::vector< uint8_t > &vch) |
|
Definition at line 216 of file script.h.
◆ CScriptNum() [1/2]
CScriptNum::CScriptNum |
( |
const int64_t & |
n | ) |
|
|
inlineexplicit |
◆ CScriptNum() [2/2]
CScriptNum::CScriptNum |
( |
const std::vector< uint8_t > & |
vch, |
|
|
bool |
fRequireMinimal, |
|
|
const size_t |
nMaxNumSize = MAXIMUM_ELEMENT_SIZE |
|
) |
| |
|
inlineexplicit |
◆ getint()
int64_t CScriptNum::getint |
( |
| ) |
const |
|
inline |
◆ getvch()
std::vector< uint8_t > CScriptNum::getvch |
( |
| ) |
const |
|
inline |
◆ IsMinimallyEncoded()
◆ MinimallyEncode()
bool CScriptNum::MinimallyEncode |
( |
std::vector< uint8_t > & |
data | ) |
|
|
static |
◆ 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 | ) |
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]
◆ operator/() [2/2]
CScriptNum 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 |
◆ 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< uint8_t > CScriptNum::serialize |
( |
const int64_t & |
value | ) |
|
|
inlinestatic |
◆ set_vch()
static int64_t CScriptNum::set_vch |
( |
const std::vector< uint8_t > & |
vch | ) |
|
|
inlinestaticprivate |
◆ m_value
int64_t CScriptNum::m_value |
|
private |
◆ MAXIMUM_ELEMENT_SIZE
const size_t CScriptNum::MAXIMUM_ELEMENT_SIZE = 4 |
|
static |
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.
The documentation for this class was generated from the following files: