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
bool operator== (STPathElement const &t) 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 17 of file STPathSet.h.

Member Enumeration Documentation

◆ Type

Enumerator
TypeNone 
TypeAccount 
TypeCurrency 
TypeIssuer 
TypeMpt 
TypeBoundary 
TypeAsset 
TypeAll 

Definition at line 30 of file STPathSet.h.

Constructor & Destructor Documentation

◆ STPathElement() [1/5]

xrpl::STPathElement::STPathElement ( )

Definition at line 238 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 243 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 278 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 301 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 319 of file STPathSet.h.

◆ isOffer()

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

Definition at line 325 of file STPathSet.h.

◆ isAccount()

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

Definition at line 331 of file STPathSet.h.

◆ hasIssuer()

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

Definition at line 343 of file STPathSet.h.

◆ hasCurrency()

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

Definition at line 349 of file STPathSet.h.

◆ hasMPT()

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

Definition at line 355 of file STPathSet.h.

◆ hasAsset()

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

Definition at line 361 of file STPathSet.h.

◆ isNone()

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

Definition at line 367 of file STPathSet.h.

◆ getAccountID()

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

Definition at line 375 of file STPathSet.h.

◆ getPathAsset()

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

Definition at line 381 of file STPathSet.h.

◆ getCurrency()

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

Definition at line 387 of file STPathSet.h.

◆ getMPTID()

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

Definition at line 393 of file STPathSet.h.

◆ getIssuerID()

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

Definition at line 399 of file STPathSet.h.

◆ isType()

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

Definition at line 337 of file STPathSet.h.

◆ operator==()

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

Definition at line 405 of file STPathSet.h.

◆ operator!=()

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

Definition at line 412 of file STPathSet.h.

◆ getHash()

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

Definition at line 24 of file STPathSet.cpp.

◆ getCounter()

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

Definition at line 109 of file CountedObject.h.

Member Data Documentation

◆ type_

unsigned int xrpl::STPathElement::type_
private

Definition at line 19 of file STPathSet.h.

◆ accountID_

AccountID xrpl::STPathElement::accountID_
private

Definition at line 20 of file STPathSet.h.

◆ assetID_

PathAsset xrpl::STPathElement::assetID_
private

Definition at line 21 of file STPathSet.h.

◆ issuerID_

AccountID xrpl::STPathElement::issuerID_
private

Definition at line 22 of file STPathSet.h.

◆ isOffer_

bool xrpl::STPathElement::isOffer_
private

Definition at line 24 of file STPathSet.h.

◆ hashValue_

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

Definition at line 25 of file STPathSet.h.

◆ Object

Definition at line 134 of file CountedObject.h.