rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
xrpl::ledger_entries::DirectoryNode Class Reference

Ledger Entry: DirectoryNode. More...

#include <DirectoryNode.h>

Inheritance diagram for xrpl::ledger_entries::DirectoryNode:
Inheritance graph
[legend]
Collaboration diagram for xrpl::ledger_entries::DirectoryNode:
Collaboration graph
[legend]

Public Member Functions

 DirectoryNode (std::shared_ptr< SLE const > sle)
 Construct a DirectoryNode ledger entry wrapper from an existing SLE object.
 
protocol_autogen::Optional< SF_ACCOUNT::type::value_type > getOwner () const
 Get sfOwner (soeOPTIONAL)
 
bool hasOwner () const
 Check if sfOwner is present.
 
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerPaysCurrency () const
 Get sfTakerPaysCurrency (soeOPTIONAL)
 
bool hasTakerPaysCurrency () const
 Check if sfTakerPaysCurrency is present.
 
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerPaysIssuer () const
 Get sfTakerPaysIssuer (soeOPTIONAL)
 
bool hasTakerPaysIssuer () const
 Check if sfTakerPaysIssuer is present.
 
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerGetsCurrency () const
 Get sfTakerGetsCurrency (soeOPTIONAL)
 
bool hasTakerGetsCurrency () const
 Check if sfTakerGetsCurrency is present.
 
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerGetsIssuer () const
 Get sfTakerGetsIssuer (soeOPTIONAL)
 
bool hasTakerGetsIssuer () const
 Check if sfTakerGetsIssuer is present.
 
protocol_autogen::Optional< SF_UINT64::type::value_type > getExchangeRate () const
 Get sfExchangeRate (soeOPTIONAL)
 
bool hasExchangeRate () const
 Check if sfExchangeRate is present.
 
SF_VECTOR256::type::value_type getIndexes () const
 Get sfIndexes (soeREQUIRED)
 
SF_UINT256::type::value_type getRootIndex () const
 Get sfRootIndex (soeREQUIRED)
 
protocol_autogen::Optional< SF_UINT64::type::value_type > getIndexNext () const
 Get sfIndexNext (soeOPTIONAL)
 
bool hasIndexNext () const
 Check if sfIndexNext is present.
 
protocol_autogen::Optional< SF_UINT64::type::value_type > getIndexPrevious () const
 Get sfIndexPrevious (soeOPTIONAL)
 
bool hasIndexPrevious () const
 Check if sfIndexPrevious is present.
 
protocol_autogen::Optional< SF_UINT256::type::value_type > getNFTokenID () const
 Get sfNFTokenID (soeOPTIONAL)
 
bool hasNFTokenID () const
 Check if sfNFTokenID is present.
 
protocol_autogen::Optional< SF_UINT256::type::value_type > getPreviousTxnID () const
 Get sfPreviousTxnID (soeOPTIONAL)
 
bool hasPreviousTxnID () const
 Check if sfPreviousTxnID is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getPreviousTxnLgrSeq () const
 Get sfPreviousTxnLgrSeq (soeOPTIONAL)
 
bool hasPreviousTxnLgrSeq () const
 Check if sfPreviousTxnLgrSeq is present.
 
protocol_autogen::Optional< SF_UINT256::type::value_type > getDomainID () const
 Get sfDomainID (soeOPTIONAL)
 
bool hasDomainID () const
 Check if sfDomainID is present.
 
bool validate () const
 Validate the ledger entry.
 
LedgerEntryType getType () const
 Get the ledger entry type.
 
uint256 const & getKey () const
 Get the key (index) of this ledger entry.
 
std::optional< uint256getLedgerIndex () const
 Get the ledger index (sfLedgerIndex).
 
bool hasLedgerIndex () const
 Check if the ledger entry has a ledger index.
 
uint16_t getLedgerEntryType () const
 Get the ledger entry type field (sfLedgerEntryType).
 
std::uint32_t getFlags () const
 Get the flags field (sfFlags).
 
std::shared_ptr< SLE const > getSle () const
 Get the underlying SLE object.
 

Static Public Attributes

static constexpr LedgerEntryType entryType = ltDIR_NODE
 

Protected Attributes

std::shared_ptr< SLE const > sle_
 The underlying serialized ledger entry being wrapped.
 

Detailed Description

Ledger Entry: DirectoryNode.

Type: ltDIR_NODE (0x0064) RPC Name: directory

Immutable wrapper around SLE providing type-safe field access. Use DirectoryNodeBuilder to construct new ledger entries.

Definition at line 27 of file DirectoryNode.h.

Constructor & Destructor Documentation

◆ DirectoryNode()

xrpl::ledger_entries::DirectoryNode::DirectoryNode ( std::shared_ptr< SLE const >  sle)
explicit

Construct a DirectoryNode ledger entry wrapper from an existing SLE object.

Exceptions
std::runtime_errorif the ledger entry type doesn't match.

Definition at line 36 of file DirectoryNode.h.

Member Function Documentation

◆ getOwner()

protocol_autogen::Optional< SF_ACCOUNT::type::value_type > xrpl::ledger_entries::DirectoryNode::getOwner ( ) const

Get sfOwner (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 54 of file DirectoryNode.h.

◆ hasOwner()

bool xrpl::ledger_entries::DirectoryNode::hasOwner ( ) const

Check if sfOwner is present.

Returns
True if the field is present, false otherwise.

Definition at line 67 of file DirectoryNode.h.

◆ getTakerPaysCurrency()

protocol_autogen::Optional< SF_UINT160::type::value_type > xrpl::ledger_entries::DirectoryNode::getTakerPaysCurrency ( ) const

Get sfTakerPaysCurrency (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 78 of file DirectoryNode.h.

◆ hasTakerPaysCurrency()

bool xrpl::ledger_entries::DirectoryNode::hasTakerPaysCurrency ( ) const

Check if sfTakerPaysCurrency is present.

Returns
True if the field is present, false otherwise.

Definition at line 91 of file DirectoryNode.h.

◆ getTakerPaysIssuer()

protocol_autogen::Optional< SF_UINT160::type::value_type > xrpl::ledger_entries::DirectoryNode::getTakerPaysIssuer ( ) const

Get sfTakerPaysIssuer (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 102 of file DirectoryNode.h.

◆ hasTakerPaysIssuer()

bool xrpl::ledger_entries::DirectoryNode::hasTakerPaysIssuer ( ) const

Check if sfTakerPaysIssuer is present.

Returns
True if the field is present, false otherwise.

Definition at line 115 of file DirectoryNode.h.

◆ getTakerGetsCurrency()

protocol_autogen::Optional< SF_UINT160::type::value_type > xrpl::ledger_entries::DirectoryNode::getTakerGetsCurrency ( ) const

Get sfTakerGetsCurrency (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 126 of file DirectoryNode.h.

◆ hasTakerGetsCurrency()

bool xrpl::ledger_entries::DirectoryNode::hasTakerGetsCurrency ( ) const

Check if sfTakerGetsCurrency is present.

Returns
True if the field is present, false otherwise.

Definition at line 139 of file DirectoryNode.h.

◆ getTakerGetsIssuer()

protocol_autogen::Optional< SF_UINT160::type::value_type > xrpl::ledger_entries::DirectoryNode::getTakerGetsIssuer ( ) const

Get sfTakerGetsIssuer (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 150 of file DirectoryNode.h.

◆ hasTakerGetsIssuer()

bool xrpl::ledger_entries::DirectoryNode::hasTakerGetsIssuer ( ) const

Check if sfTakerGetsIssuer is present.

Returns
True if the field is present, false otherwise.

Definition at line 163 of file DirectoryNode.h.

◆ getExchangeRate()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::DirectoryNode::getExchangeRate ( ) const

Get sfExchangeRate (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 174 of file DirectoryNode.h.

◆ hasExchangeRate()

bool xrpl::ledger_entries::DirectoryNode::hasExchangeRate ( ) const

Check if sfExchangeRate is present.

Returns
True if the field is present, false otherwise.

Definition at line 187 of file DirectoryNode.h.

◆ getIndexes()

SF_VECTOR256::type::value_type xrpl::ledger_entries::DirectoryNode::getIndexes ( ) const

Get sfIndexes (soeREQUIRED)

Returns
The field value.

Definition at line 198 of file DirectoryNode.h.

◆ getRootIndex()

SF_UINT256::type::value_type xrpl::ledger_entries::DirectoryNode::getRootIndex ( ) const

Get sfRootIndex (soeREQUIRED)

Returns
The field value.

Definition at line 209 of file DirectoryNode.h.

◆ getIndexNext()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::DirectoryNode::getIndexNext ( ) const

Get sfIndexNext (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 220 of file DirectoryNode.h.

◆ hasIndexNext()

bool xrpl::ledger_entries::DirectoryNode::hasIndexNext ( ) const

Check if sfIndexNext is present.

Returns
True if the field is present, false otherwise.

Definition at line 233 of file DirectoryNode.h.

◆ getIndexPrevious()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::DirectoryNode::getIndexPrevious ( ) const

Get sfIndexPrevious (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 244 of file DirectoryNode.h.

◆ hasIndexPrevious()

bool xrpl::ledger_entries::DirectoryNode::hasIndexPrevious ( ) const

Check if sfIndexPrevious is present.

Returns
True if the field is present, false otherwise.

Definition at line 257 of file DirectoryNode.h.

◆ getNFTokenID()

protocol_autogen::Optional< SF_UINT256::type::value_type > xrpl::ledger_entries::DirectoryNode::getNFTokenID ( ) const

Get sfNFTokenID (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 268 of file DirectoryNode.h.

◆ hasNFTokenID()

bool xrpl::ledger_entries::DirectoryNode::hasNFTokenID ( ) const

Check if sfNFTokenID is present.

Returns
True if the field is present, false otherwise.

Definition at line 281 of file DirectoryNode.h.

◆ getPreviousTxnID()

protocol_autogen::Optional< SF_UINT256::type::value_type > xrpl::ledger_entries::DirectoryNode::getPreviousTxnID ( ) const

Get sfPreviousTxnID (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 292 of file DirectoryNode.h.

◆ hasPreviousTxnID()

bool xrpl::ledger_entries::DirectoryNode::hasPreviousTxnID ( ) const

Check if sfPreviousTxnID is present.

Returns
True if the field is present, false otherwise.

Definition at line 305 of file DirectoryNode.h.

◆ getPreviousTxnLgrSeq()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::DirectoryNode::getPreviousTxnLgrSeq ( ) const

Get sfPreviousTxnLgrSeq (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 316 of file DirectoryNode.h.

◆ hasPreviousTxnLgrSeq()

bool xrpl::ledger_entries::DirectoryNode::hasPreviousTxnLgrSeq ( ) const

Check if sfPreviousTxnLgrSeq is present.

Returns
True if the field is present, false otherwise.

Definition at line 329 of file DirectoryNode.h.

◆ getDomainID()

protocol_autogen::Optional< SF_UINT256::type::value_type > xrpl::ledger_entries::DirectoryNode::getDomainID ( ) const

Get sfDomainID (soeOPTIONAL)

Returns
The field value, or std::nullopt if not present.

Definition at line 340 of file DirectoryNode.h.

◆ hasDomainID()

bool xrpl::ledger_entries::DirectoryNode::hasDomainID ( ) const

Check if sfDomainID is present.

Returns
True if the field is present, false otherwise.

Definition at line 353 of file DirectoryNode.h.

◆ validate()

bool xrpl::ledger_entries::LedgerEntryBase::validate ( ) const
inherited

Validate the ledger entry.

Returns
true if validation passes, false otherwise

Definition at line 40 of file LedgerEntryBase.h.

◆ getType()

LedgerEntryType xrpl::ledger_entries::LedgerEntryBase::getType ( ) const
inherited

Get the ledger entry type.

Returns
The type of this ledger entry

Definition at line 57 of file LedgerEntryBase.h.

◆ getKey()

uint256 const & xrpl::ledger_entries::LedgerEntryBase::getKey ( ) const
inherited

Get the key (index) of this ledger entry.

The key uniquely identifies this ledger entry in the ledger state.

Returns
A constant reference to the 256-bit key

Definition at line 70 of file LedgerEntryBase.h.

◆ getLedgerIndex()

std::optional< uint256 > xrpl::ledger_entries::LedgerEntryBase::getLedgerIndex ( ) const
inherited

Get the ledger index (sfLedgerIndex).

This field is OPTIONAL and represents the index of the ledger entry.

Returns
The ledger index if present, std::nullopt otherwise

Definition at line 85 of file LedgerEntryBase.h.

◆ hasLedgerIndex()

bool xrpl::ledger_entries::LedgerEntryBase::hasLedgerIndex ( ) const
inherited

Check if the ledger entry has a ledger index.

Returns
true if sfLedgerIndex is present, false otherwise

Definition at line 100 of file LedgerEntryBase.h.

◆ getLedgerEntryType()

uint16_t xrpl::ledger_entries::LedgerEntryBase::getLedgerEntryType ( ) const
inherited

Get the ledger entry type field (sfLedgerEntryType).

This field is REQUIRED for all ledger entries and indicates the type of the ledger entry (e.g., AccountRoot, RippleState, Offer, etc.).

Returns
The ledger entry type as a 16-bit unsigned integer

Definition at line 114 of file LedgerEntryBase.h.

◆ getFlags()

std::uint32_t xrpl::ledger_entries::LedgerEntryBase::getFlags ( ) const
inherited

Get the flags field (sfFlags).

This field is REQUIRED for all ledger entries and contains type-specific flags that modify the behavior of the ledger entry.

Returns
The flags value as a 32-bit unsigned integer

Definition at line 128 of file LedgerEntryBase.h.

◆ getSle()

std::shared_ptr< SLE const > xrpl::ledger_entries::LedgerEntryBase::getSle ( ) const
inherited

Get the underlying SLE object.

Provides direct access to the wrapped serialized ledger entry object for cases where the type-safe accessors are insufficient.

Returns
A constant reference to the underlying SLE object

Definition at line 142 of file LedgerEntryBase.h.

Member Data Documentation

◆ entryType

constexpr LedgerEntryType xrpl::ledger_entries::DirectoryNode::entryType = ltDIR_NODE
staticconstexpr

Definition at line 30 of file DirectoryNode.h.

◆ sle_

std::shared_ptr<SLE const> xrpl::ledger_entries::LedgerEntryBase::sle_
protectedinherited

The underlying serialized ledger entry being wrapped.

Definition at line 149 of file LedgerEntryBase.h.