20#include <xrpl/basics/contract.h> 
   21#include <xrpl/json/json_value.h> 
   22#include <xrpl/protocol/SField.h> 
   23#include <xrpl/protocol/STBase.h> 
   24#include <xrpl/protocol/STCurrency.h> 
   25#include <xrpl/protocol/Serializer.h> 
   26#include <xrpl/protocol/UintTypes.h> 
   46    : 
STBase{name}, currency_{currency}
 
 
   78    return v && (*v == *
this);
 
 
  102    return emplace(n, buf, std::move(*
this));
 
 
  110        Throw<std::runtime_error>(
 
  111            "currencyFromJson currency must be a string Json value");
 
  117        Throw<std::runtime_error>(
 
  118            "currencyFromJson currency must be a valid currency");
 
 
std::string asString() const
Returns the unquoted string value.
 
A type which can be exported to a well known binary format.
 
static STBase * emplace(std::size_t n, void *buf, T &&val)
 
bool isEquivalent(STBase const &t) const override
 
bool isDefault() const override
 
void add(Serializer &s) const override
 
SerializedTypeID getSType() const override
 
Json::Value getJson(JsonOptions) const override
 
std::string getText() const override
 
static std::unique_ptr< STCurrency > construct(SerialIter &, SField const &name)
 
STBase * move(std::size_t n, void *buf) override
 
STBase * copy(std::size_t n, void *buf) const override
 
int addBitString(base_uint< Bits, Tag > const &v)
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
Currency const & badCurrency()
We deliberately disallow the currency that looks like "XRP" because too many people were using it ins...
 
bool isXRP(AccountID const &c)
 
STCurrency currencyFromJson(SField const &name, Json::Value const &v)
 
Currency const & noCurrency()
A placeholder for empty currencies.
 
std::string to_string(base_uint< Bits, Tag > const &a)
 
bool to_currency(Currency &, std::string const &)
Tries to convert a string to a Currency, returns true on success.
 
Note, should be treated as flags that can be | and &.