rippled
|
Public Types | |
using | unit_type = UnitTag |
using | value_type = T |
Public Member Functions | |
TaggedFee ()=default | |
constexpr | TaggedFee (TaggedFee const &other)=default |
constexpr TaggedFee & | operator= (TaggedFee const &other)=default |
constexpr | TaggedFee (beast::Zero) |
constexpr TaggedFee & | operator= (beast::Zero) |
constexpr | TaggedFee (value_type fee) |
TaggedFee & | operator= (value_type fee) |
template<class Other , class = std::enable_if_t< is_compatible_v<Other> && is_safetocasttovalue_v<value_type, Other>>> | |
constexpr | TaggedFee (TaggedFee< unit_type, Other > const &fee) |
Instances with the same unit, and a type that is "safe" to covert to this one can be converted implicitly. More... | |
constexpr TaggedFee | operator* (value_type const &rhs) const |
constexpr value_type | operator/ (TaggedFee const &rhs) const |
TaggedFee & | operator+= (TaggedFee const &other) |
TaggedFee & | operator-= (TaggedFee const &other) |
TaggedFee & | operator++ () |
TaggedFee & | operator-- () |
TaggedFee & | operator*= (value_type const &rhs) |
TaggedFee & | operator/= (value_type const &rhs) |
template<class transparent = value_type> | |
std::enable_if_t< std::is_integral_v< transparent >, TaggedFee & > | operator%= (value_type const &rhs) |
TaggedFee | operator- () const |
bool | operator== (TaggedFee const &other) const |
template<class Other , class = enable_if_compatible_t<Other>> | |
bool | operator== (TaggedFee< unit_type, Other > const &other) const |
bool | operator== (value_type other) const |
template<class Other , class = enable_if_compatible_t<Other>> | |
bool | operator!= (TaggedFee< unit_type, Other > const &other) const |
bool | operator< (TaggedFee const &other) const |
constexpr | operator bool () const noexcept |
Returns true if the amount is not zero. More... | |
constexpr int | signum () const noexcept |
Return the sign of the amount. More... | |
constexpr value_type | fee () const |
Returns the number of drops. More... | |
template<class Other > | |
constexpr double | decimalFromReference (TaggedFee< unit_type, Other > reference) const |
std::enable_if_t< is_usable_unit_v< TaggedFee >, Json::Value > | jsonClipped () const |
constexpr value_type | value () const |
Returns the underlying value. More... | |
Protected Types | |
template<class Other > | |
using | enable_if_compatible_t = typename std::enable_if_t< is_compatible_v< Other > > |
template<class OtherFee > | |
using | enable_if_compatiblefee_t = typename std::enable_if_t< is_compatiblefee_v< OtherFee > > |
Static Protected Attributes | |
template<class Other > | |
static constexpr bool | is_compatible_v |
template<class OtherFee , class = enable_if_unit_t<OtherFee>> | |
static constexpr bool | is_compatiblefee_v |
Private Attributes | |
value_type | fee_ |
Friends | |
constexpr friend TaggedFee | operator* (value_type lhs, TaggedFee const &rhs) |
std::istream & | operator>> (std::istream &s, TaggedFee &val) |
Definition at line 70 of file FeeUnits.h.
using ripple::feeunit::TaggedFee< UnitTag, T >::unit_type = UnitTag |
Definition at line 78 of file FeeUnits.h.
using ripple::feeunit::TaggedFee< UnitTag, T >::value_type = T |
Definition at line 79 of file FeeUnits.h.
|
protected |
Definition at line 97 of file FeeUnits.h.
|
protected |
Definition at line 101 of file FeeUnits.h.
|
default |
|
constexprdefault |
|
explicitconstexpr |
Definition at line 109 of file FeeUnits.h.
|
explicitconstexpr |
Definition at line 119 of file FeeUnits.h.
|
constexpr |
Instances with the same unit, and a type that is "safe" to covert to this one can be converted implicitly.
Definition at line 138 of file FeeUnits.h.
|
constexprdefault |
|
constexpr |
Definition at line 113 of file FeeUnits.h.
TaggedFee& ripple::feeunit::TaggedFee< UnitTag, T >::operator= | ( | value_type | fee | ) |
Definition at line 124 of file FeeUnits.h.
|
constexpr |
Definition at line 144 of file FeeUnits.h.
|
constexpr |
Definition at line 157 of file FeeUnits.h.
TaggedFee& ripple::feeunit::TaggedFee< UnitTag, T >::operator+= | ( | TaggedFee< UnitTag, T > const & | other | ) |
Definition at line 163 of file FeeUnits.h.
TaggedFee& ripple::feeunit::TaggedFee< UnitTag, T >::operator-= | ( | TaggedFee< UnitTag, T > const & | other | ) |
Definition at line 170 of file FeeUnits.h.
TaggedFee& ripple::feeunit::TaggedFee< UnitTag, T >::operator++ | ( | ) |
Definition at line 177 of file FeeUnits.h.
TaggedFee& ripple::feeunit::TaggedFee< UnitTag, T >::operator-- | ( | ) |
Definition at line 184 of file FeeUnits.h.
TaggedFee& ripple::feeunit::TaggedFee< UnitTag, T >::operator*= | ( | value_type const & | rhs | ) |
Definition at line 191 of file FeeUnits.h.
TaggedFee& ripple::feeunit::TaggedFee< UnitTag, T >::operator/= | ( | value_type const & | rhs | ) |
Definition at line 198 of file FeeUnits.h.
std::enable_if_t<std::is_integral_v<transparent>, TaggedFee&> ripple::feeunit::TaggedFee< UnitTag, T >::operator%= | ( | value_type const & | rhs | ) |
Definition at line 206 of file FeeUnits.h.
TaggedFee ripple::feeunit::TaggedFee< UnitTag, T >::operator- | ( | ) | const |
Definition at line 213 of file FeeUnits.h.
bool ripple::feeunit::TaggedFee< UnitTag, T >::operator== | ( | TaggedFee< UnitTag, T > const & | other | ) | const |
Definition at line 221 of file FeeUnits.h.
bool ripple::feeunit::TaggedFee< UnitTag, T >::operator== | ( | TaggedFee< unit_type, Other > const & | other | ) | const |
Definition at line 228 of file FeeUnits.h.
bool ripple::feeunit::TaggedFee< UnitTag, T >::operator== | ( | value_type | other | ) | const |
Definition at line 234 of file FeeUnits.h.
bool ripple::feeunit::TaggedFee< UnitTag, T >::operator!= | ( | TaggedFee< unit_type, Other > const & | other | ) | const |
Definition at line 241 of file FeeUnits.h.
bool ripple::feeunit::TaggedFee< UnitTag, T >::operator< | ( | TaggedFee< UnitTag, T > const & | other | ) | const |
Definition at line 247 of file FeeUnits.h.
|
explicitconstexprnoexcept |
Returns true if the amount is not zero.
Definition at line 253 of file FeeUnits.h.
|
constexprnoexcept |
Return the sign of the amount.
Definition at line 260 of file FeeUnits.h.
|
constexpr |
Returns the number of drops.
Definition at line 267 of file FeeUnits.h.
|
constexpr |
Definition at line 274 of file FeeUnits.h.
std::enable_if_t<is_usable_unit_v<TaggedFee>, Json::Value> ripple::feeunit::TaggedFee< UnitTag, T >::jsonClipped | ( | ) | const |
Definition at line 284 of file FeeUnits.h.
|
constexpr |
Returns the underlying value.
Code SHOULD NOT call this function unless the type has been abstracted away, e.g. in a templated function.
Definition at line 313 of file FeeUnits.h.
|
friend |
Definition at line 150 of file FeeUnits.h.
|
friend |
Definition at line 319 of file FeeUnits.h.
|
private |
Definition at line 82 of file FeeUnits.h.
|
staticconstexprprotected |
Definition at line 86 of file FeeUnits.h.
|
staticconstexprprotected |
Definition at line 91 of file FeeUnits.h.