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 "ripple::STPathElement::STPathElement : account is set");
259 "ripple::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.
Currency const & getCurrency() const
bool operator==(STPathElement const &t) const
static std::size_t get_hash(STPathElement const &element)
AccountID const & getAccountID() const
AccountID const & getIssuerID() const
STPathElement & operator=(STPathElement const &)=default
bool operator!=(STPathElement const &t) const
STPathElement(STPathElement const &)=default
STBase * move(std::size_t n, void *buf) override
bool isDefault() const override
std::vector< STPath >::const_iterator end() const
std::vector< STPath > value
bool isEquivalent(STBase const &t) const override
STBase * copy(std::size_t n, void *buf) const override
void push_back(STPath const &e)
bool assembleAdd(STPath const &base, STPathElement const &tail)
std::vector< STPath >::const_iterator begin() const
Json::Value getJson(JsonOptions) const override
SerializedTypeID getSType() const override
void add(Serializer &s) const override
std::vector< STPath >::const_reference operator[](std::vector< STPath >::size_type n) const
void emplace_back(Args &&... args)
std::vector< STPath >::size_type size() const
bool operator==(STPath const &t) const
std::vector< STPathElement >::const_reference front() const
std::vector< STPathElement >::const_iterator begin() const
std::vector< STPathElement > mPath
STPathElement & operator[](int i)
std::vector< STPathElement >::const_iterator end() const
Json::Value getJson(JsonOptions) const
void push_back(STPathElement const &e)
bool hasSeen(AccountID const &account, Currency const ¤cy, AccountID const &issuer) const
std::vector< STPathElement >::size_type size() const
std::vector< STPathElement >::const_reference back() const
void emplace_back(Args &&... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
AccountID const & noAccount()
A placeholder for empty accounts.
bool isXRP(AccountID const &c)
Note, should be treated as flags that can be | and &.