20 #ifndef RIPPLE_PROTOCOL_STPATHSET_H_INCLUDED
21 #define RIPPLE_PROTOCOL_STPATHSET_H_INCLUDED
23 #include <ripple/json/json_value.h>
24 #include <ripple/protocol/SField.h>
25 #include <ripple/protocol/STBase.h>
26 #include <ripple/protocol/UintTypes.h>
90 bool forceCurrency =
false)
100 if (forceCurrency || !
isXRP(currency))
230 return mPath.empty();
239 template <
typename... Args>
243 mPath.emplace_back(std::forward<Args>(args)...);
257 return mPath.begin();
281 return mPath.front();
329 return emplace(n, buf, std::move(*
this));
352 return value.empty();
371 return value.begin();
389 return value.empty();
398 template <
typename... Args>
402 value.emplace_back(std::forward<Args>(args)...);
std::vector< STPath >::reference operator[](std::vector< STPath >::size_type n)
void push_back(STPathElement const &e)
STPathElement & operator=(STPathElement const &)=default
static std::size_t get_hash(STPathElement const &element)
std::vector< STPath >::const_iterator end() const
bool operator==(const STPathElement &t) const
std::vector< STPathElement > mPath
SerializedTypeID getSType() const override
STPathElement(unsigned int uType, AccountID const &account, Currency const ¤cy, AccountID const &issuer)
void emplace_back(Args &&... args)
Currency const & getCurrency() const
std::vector< STPathElement >::size_type size() const
std::vector< STPathElement >::const_iterator end() const
bool isEquivalent(const STBase &t) const override
const STPathElement & operator[](int i) const
static STBase * emplace(std::size_t n, void *buf, T &&val)
STBase * copy(std::size_t n, void *buf) const override
STBase * move(std::size_t n, void *buf) override
STPathSet(SField const &n)
AccountID const & getIssuerID() const
void add(Serializer &s) const override
AccountID const & getAccountID() const
void emplace_back(Args &&... args)
bool isDefault() const override
STPathElement & operator[](int i)
std::vector< STPathElement >::const_reference back() const
bool isXRP(AccountID const &c)
bool operator!=(const STPathElement &t) const
std::vector< STPath >::const_iterator begin() const
std::vector< STPath >::const_reference operator[](std::vector< STPath >::size_type n) const
std::vector< STPathElement >::const_iterator begin() const
Json::Value getJson(JsonOptions) const
bool hasSeen(AccountID const &account, Currency const ¤cy, AccountID const &issuer) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::vector< STPath > value
A type which can be exported to a well known binary format.
std::vector< STPathElement >::const_reference front() const
Json::Value getJson(JsonOptions) const override
bool operator==(STPath const &t) const
std::vector< STPath >::size_type size() const
STPath(std::vector< STPathElement > p)
STPathElement(AccountID const &account, Currency const ¤cy, AccountID const &issuer, bool forceCurrency=false)
bool assembleAdd(STPath const &base, STPathElement const &tail)
STPathElement(std::optional< AccountID > const &account, std::optional< Currency > const ¤cy, std::optional< AccountID > const &issuer)
AccountID const & noAccount()
A placeholder for empty accounts.
void push_back(STPath const &e)