1#ifndef XRPL_PROTOCOL_STPATHSET_H_INCLUDED
2#define XRPL_PROTOCOL_STPATHSET_H_INCLUDED
4#include <xrpl/basics/CountedObject.h>
5#include <xrpl/beast/utility/instrumentation.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/protocol/SField.h>
8#include <xrpl/protocol/STBase.h>
9#include <xrpl/protocol/UintTypes.h>
52 bool forceCurrency =
false);
118 template <
typename... Args>
207 template <
typename... Args>
244 "xrpl::STPathElement::STPathElement : account is set");
259 "xrpl::STPathElement::STPathElement : issuer is set");
271 , mAccountID(account)
272 , mCurrencyID(currency)
274 , is_offer_(
isXRP(mAccountID))
279 if (forceCurrency || !
isXRP(currency))
294 , mAccountID(account)
295 , mCurrencyID(currency)
297 , is_offer_(
isXRP(mAccountID))
387 return mPath.empty();
396template <
typename... Args>
406 return mPath.begin();
473 return value.begin();
491 return value.empty();
500template <
typename... Args>
Tracks the number of instances of an object.
A type which can be exported to a well known binary format.
AccountID const & getAccountID() const
static std::size_t get_hash(STPathElement const &element)
bool operator!=(STPathElement const &t) const
STPathElement(STPathElement const &)=default
Currency const & getCurrency() const
bool operator==(STPathElement const &t) const
STPathElement & operator=(STPathElement const &)=default
AccountID const & getIssuerID() const
void add(Serializer &s) const override
std::vector< STPath >::const_iterator begin() const
bool assembleAdd(STPath const &base, STPathElement const &tail)
void push_back(STPath const &e)
std::vector< STPath > value
std::vector< STPath >::const_reference operator[](std::vector< STPath >::size_type n) const
STBase * copy(std::size_t n, void *buf) const override
std::vector< STPath >::size_type size() const
void emplace_back(Args &&... args)
STBase * move(std::size_t n, void *buf) override
std::vector< STPath >::const_iterator end() const
Json::Value getJson(JsonOptions) const override
bool isEquivalent(STBase const &t) const override
bool isDefault() const override
SerializedTypeID getSType() const override
std::vector< STPathElement >::size_type size() const
Json::Value getJson(JsonOptions) const
void push_back(STPathElement const &e)
bool operator==(STPath const &t) const
STPathElement & operator[](int i)
std::vector< STPathElement >::const_iterator end() const
bool hasSeen(AccountID const &account, Currency const ¤cy, AccountID const &issuer) const
void emplace_back(Args &&... args)
std::vector< STPathElement >::const_reference front() const
std::vector< STPathElement >::const_reference back() const
std::vector< STPathElement > mPath
std::vector< STPathElement >::const_iterator begin() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool isXRP(AccountID const &c)
AccountID const & noAccount()
A placeholder for empty accounts.
Note, should be treated as flags that can be | and &.