xrpld
Loading...
Searching...
No Matches
xrpl::PathAsset Class Reference

#include <PathAsset.h>

Collaboration diagram for xrpl::PathAsset:

Public Member Functions

 PathAsset ()=default
 PathAsset (Asset const &asset)
 PathAsset (Currency const &currency)
 PathAsset (MPTID const &mpt)
template<ValidPathAsset T>
constexpr bool holds () const
constexpr bool isXRP () const
template<ValidPathAsset T>
T const & get () const
constexpr std::variant< Currency, MPTID > const & value () const
template<typename... Visitors>
constexpr auto visit (Visitors &&... visitors) const -> decltype(auto)
template<ValidPathAsset T>
T const & get () const

Private Attributes

std::variant< Currency, MPTIDeasset_

Friends

constexpr bool operator== (PathAsset const &lhs, PathAsset const &rhs)

Detailed Description

Definition at line 10 of file PathAsset.h.

Constructor & Destructor Documentation

◆ PathAsset() [1/4]

xrpl::PathAsset::PathAsset ( )
default

◆ PathAsset() [2/4]

xrpl::PathAsset::PathAsset ( Asset const & asset)

Definition at line 60 of file PathAsset.h.

◆ PathAsset() [3/4]

xrpl::PathAsset::PathAsset ( Currency const & currency)

Definition at line 19 of file PathAsset.h.

◆ PathAsset() [4/4]

xrpl::PathAsset::PathAsset ( MPTID const & mpt)

Definition at line 22 of file PathAsset.h.

Member Function Documentation

◆ holds()

template<ValidPathAsset T>
bool xrpl::PathAsset::holds ( ) const
nodiscardconstexpr

Definition at line 69 of file PathAsset.h.

◆ isXRP()

bool xrpl::PathAsset::isXRP ( ) const
nodiscardconstexpr

Definition at line 90 of file PathAsset.h.

◆ get() [1/2]

template<ValidPathAsset T>
T const & xrpl::PathAsset::get ( ) const

◆ value()

std::variant< Currency, MPTID > const & xrpl::PathAsset::value ( ) const
nodiscardconstexpr

Definition at line 84 of file PathAsset.h.

◆ visit()

template<typename... Visitors>
auto xrpl::PathAsset::visit ( Visitors &&... visitors) const -> decltype(auto)
constexpr

Definition at line 43 of file PathAsset.h.

◆ get() [2/2]

template<ValidPathAsset T>
T const & xrpl::PathAsset::get ( ) const
nodiscard

Definition at line 76 of file PathAsset.h.

◆ operator==

bool operator== ( PathAsset const & lhs,
PathAsset const & rhs )
friend

Definition at line 98 of file PathAsset.h.

Member Data Documentation

◆ easset_

std::variant<Currency, MPTID> xrpl::PathAsset::easset_
private

Definition at line 13 of file PathAsset.h.