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
STPathElementoperator= (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)
auto 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
size_t getHash () 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 21 of file STPathSet.h.

Member Enumeration Documentation

◆ Type

Enumerator
TypeNone 
TypeAccount 
TypeCurrency 
TypeIssuer 
TypeMpt 
TypeBoundary 
TypeAsset 
TypeAll 

Definition at line 34 of file STPathSet.h.

Constructor & Destructor Documentation

◆ STPathElement() [1/5]

xrpl::STPathElement::STPathElement ( )

Definition at line 253 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 261 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 296 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 319 of file STPathSet.h.

Member Function Documentation

◆ operator=()

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

◆ getNodeType()

auto xrpl::STPathElement::getNodeType ( ) const
nodiscard

Definition at line 340 of file STPathSet.h.

◆ isOffer()

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

Definition at line 346 of file STPathSet.h.

◆ isAccount()

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

Definition at line 352 of file STPathSet.h.

◆ hasIssuer()

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

Definition at line 364 of file STPathSet.h.

◆ hasCurrency()

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

Definition at line 370 of file STPathSet.h.

◆ hasMPT()

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

Definition at line 376 of file STPathSet.h.

◆ hasAsset()

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

Definition at line 382 of file STPathSet.h.

◆ isNone()

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

Definition at line 388 of file STPathSet.h.

◆ getAccountID()

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

Definition at line 396 of file STPathSet.h.

◆ getPathAsset()

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

Definition at line 402 of file STPathSet.h.

◆ getCurrency()

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

Definition at line 408 of file STPathSet.h.

◆ getMPTID()

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

Definition at line 414 of file STPathSet.h.

◆ getIssuerID()

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

Definition at line 420 of file STPathSet.h.

◆ isType()

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

Definition at line 358 of file STPathSet.h.

◆ getHash() [1/2]

size_t xrpl::STPathElement::getHash ( ) const
nodiscard

Definition at line 55 of file STPathSet.cpp.

◆ operator==()

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

Definition at line 426 of file STPathSet.h.

◆ getHash() [2/2]

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

Definition at line 25 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 23 of file STPathSet.h.

◆ accountID_

AccountID xrpl::STPathElement::accountID_
private

Definition at line 24 of file STPathSet.h.

◆ assetID_

PathAsset xrpl::STPathElement::assetID_
private

Definition at line 25 of file STPathSet.h.

◆ issuerID_

AccountID xrpl::STPathElement::issuerID_
private

Definition at line 26 of file STPathSet.h.

◆ isOffer_

bool xrpl::STPathElement::isOffer_
private

Definition at line 28 of file STPathSet.h.

◆ hashValue_

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

Definition at line 29 of file STPathSet.h.

◆ Object

Definition at line 138 of file CountedObject.h.