xrpld
Loading...
Searching...
No Matches
xrpl::STPathElement Class Referencefinal

#include <STPathSet.h>

Inheritance diagram for xrpl::STPathElement:
Collaboration diagram for xrpl::STPathElement:

Public Types

enum  Type {
  TypeNone = 0x00 , TypeAccount = 0x01 , TypeCurrency = 0x10 , TypeIssuer = 0x20 ,
  TypeMpt = 0x40 , TypeBoundary = 0xFF , TypeAsset = TypeCurrency | TypeMpt , TypeAll = TypeAccount | TypeCurrency | TypeIssuer | TypeMpt
}

Public Member Functions

 STPathElement ()
 STPathElement (STPathElement const &)=default
STPathElement & operator= (STPathElement const &)=default
 STPathElement (std::optional< AccountID > const &account, std::optional< PathAsset > const &asset, std::optional< AccountID > const &issuer)
 STPathElement (AccountID const &account, PathAsset const &asset, AccountID const &issuer, bool forceAsset=false)
 STPathElement (unsigned int uType, AccountID const &account, PathAsset const &asset, AccountID const &issuer)
std::uint32_t getNodeType () const
bool isOffer () const
bool isAccount () const
bool hasIssuer () const
bool hasCurrency () const
bool hasMPT () const
bool hasAsset () const
bool isNone () const
AccountID const & getAccountID () const
PathAsset const & getPathAsset () const
Currency const & getCurrency () const
MPTID const & getMPTID () const
AccountID const & getIssuerID () const
bool isType (Type const &pe) const
bool operator== (STPathElement const &t) const

Public Attributes

friend Object

Static Private Member Functions

static std::size_t getHash (STPathElement const &element)
static auto & getCounter () noexcept

Private Attributes

unsigned int type_
AccountID accountID_
PathAsset assetID_
AccountID issuerID_
bool isOffer_
std::size_t hashValue_

Detailed Description

Definition at line 23 of file STPathSet.h.

Member Enumeration Documentation

◆ Type

Enumerator
TypeNone 
TypeAccount 
TypeCurrency 
TypeIssuer 
TypeMpt 
TypeBoundary 
TypeAsset 
TypeAll 

Definition at line 36 of file STPathSet.h.

Constructor & Destructor Documentation

◆ STPathElement() [1/5]

xrpl::STPathElement::STPathElement ( )

Definition at line 340 of file STPathSet.h.

◆ STPathElement() [2/5]

xrpl::STPathElement::STPathElement ( STPathElement const & )
default

◆ STPathElement() [3/5]

xrpl::STPathElement::STPathElement ( std::optional< AccountID > const & account,
std::optional< PathAsset > const & asset,
std::optional< AccountID > const & issuer )

Definition at line 348 of file STPathSet.h.

◆ STPathElement() [4/5]

xrpl::STPathElement::STPathElement ( AccountID const & account,
PathAsset const & asset,
AccountID const & issuer,
bool forceAsset = false )

Definition at line 383 of file STPathSet.h.

◆ STPathElement() [5/5]

xrpl::STPathElement::STPathElement ( unsigned int uType,
AccountID const & account,
PathAsset const & asset,
AccountID const & issuer )

Definition at line 406 of file STPathSet.h.

Member Function Documentation

◆ operator=()

STPathElement & xrpl::STPathElement::operator= ( STPathElement const & )
default

◆ getNodeType()

std::uint32_t xrpl::STPathElement::getNodeType ( ) const
nodiscard

Definition at line 427 of file STPathSet.h.

◆ isOffer()

bool xrpl::STPathElement::isOffer ( ) const
nodiscard

Definition at line 433 of file STPathSet.h.

◆ isAccount()

bool xrpl::STPathElement::isAccount ( ) const
nodiscard

Definition at line 439 of file STPathSet.h.

◆ hasIssuer()

bool xrpl::STPathElement::hasIssuer ( ) const
nodiscard

Definition at line 451 of file STPathSet.h.

◆ hasCurrency()

bool xrpl::STPathElement::hasCurrency ( ) const
nodiscard

Definition at line 457 of file STPathSet.h.

◆ hasMPT()

bool xrpl::STPathElement::hasMPT ( ) const
nodiscard

Definition at line 463 of file STPathSet.h.

◆ hasAsset()

bool xrpl::STPathElement::hasAsset ( ) const
nodiscard

Definition at line 469 of file STPathSet.h.

◆ isNone()

bool xrpl::STPathElement::isNone ( ) const
nodiscard

Definition at line 475 of file STPathSet.h.

◆ getAccountID()

AccountID const & xrpl::STPathElement::getAccountID ( ) const
nodiscard

Definition at line 483 of file STPathSet.h.

◆ getPathAsset()

PathAsset const & xrpl::STPathElement::getPathAsset ( ) const
nodiscard

Definition at line 489 of file STPathSet.h.

◆ getCurrency()

Currency const & xrpl::STPathElement::getCurrency ( ) const
nodiscard

Definition at line 495 of file STPathSet.h.

◆ getMPTID()

MPTID const & xrpl::STPathElement::getMPTID ( ) const
nodiscard

Definition at line 501 of file STPathSet.h.

◆ getIssuerID()

AccountID const & xrpl::STPathElement::getIssuerID ( ) const
nodiscard

Definition at line 507 of file STPathSet.h.

◆ isType()

bool xrpl::STPathElement::isType ( Type const & pe) const
nodiscard

Definition at line 445 of file STPathSet.h.

◆ operator==()

bool xrpl::STPathElement::operator== ( STPathElement const & t) const

Definition at line 513 of file STPathSet.h.

◆ getHash()

std::size_t xrpl::STPathElement::getHash ( STPathElement const & element)
staticprivate

Definition at line 29 of file STPathSet.cpp.

◆ getCounter()

auto & xrpl::CountedObject< STPathElement >::getCounter ( )
staticprivatenoexceptinherited

Definition at line 113 of file CountedObject.h.

Member Data Documentation

◆ type_

unsigned int xrpl::STPathElement::type_
private

Definition at line 25 of file STPathSet.h.

◆ accountID_

AccountID xrpl::STPathElement::accountID_
private

Definition at line 26 of file STPathSet.h.

◆ assetID_

PathAsset xrpl::STPathElement::assetID_
private

Definition at line 27 of file STPathSet.h.

◆ issuerID_

AccountID xrpl::STPathElement::issuerID_
private

Definition at line 28 of file STPathSet.h.

◆ isOffer_

bool xrpl::STPathElement::isOffer_
private

Definition at line 30 of file STPathSet.h.

◆ hashValue_

std::size_t xrpl::STPathElement::hashValue_
private

Definition at line 31 of file STPathSet.h.

◆ Object

Definition at line 138 of file CountedObject.h.