|
rippled
|
Base class for type-safe ledger entry wrappers. More...
#include <LedgerEntryBase.h>


Public Member Functions | |
| LedgerEntryBase (std::shared_ptr< SLE const > sle) | |
| Construct a ledger entry wrapper from an existing SLE object. | |
| 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< uint256 > | getLedgerIndex () 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. | |
Protected Attributes | |
| std::shared_ptr< SLE const > | sle_ |
| The underlying serialized ledger entry being wrapped. | |
Base class for type-safe ledger entry wrappers.
This class provides common functionality for all ledger entry types, including access to common fields (sfLedgerIndex, sfLedgerEntryType, sfFlags).
This is an immutable wrapper around SLE (Serialized Ledger Entry). Use the corresponding Builder classes to construct new ledger entries.
Definition at line 23 of file LedgerEntryBase.h.
|
explicit |
Construct a ledger entry wrapper from an existing SLE object.
| sle | The underlying serialized ledger entry to wrap |
Definition at line 30 of file LedgerEntryBase.h.
| bool xrpl::ledger_entries::LedgerEntryBase::validate | ( | ) | const |
Validate the ledger entry.
Definition at line 40 of file LedgerEntryBase.h.
| LedgerEntryType xrpl::ledger_entries::LedgerEntryBase::getType | ( | ) | const |
Get the ledger entry type.
Definition at line 57 of file LedgerEntryBase.h.
| uint256 const & xrpl::ledger_entries::LedgerEntryBase::getKey | ( | ) | const |
Get the key (index) of this ledger entry.
The key uniquely identifies this ledger entry in the ledger state.
Definition at line 70 of file LedgerEntryBase.h.
| std::optional< uint256 > xrpl::ledger_entries::LedgerEntryBase::getLedgerIndex | ( | ) | const |
Get the ledger index (sfLedgerIndex).
This field is OPTIONAL and represents the index of the ledger entry.
Definition at line 85 of file LedgerEntryBase.h.
| bool xrpl::ledger_entries::LedgerEntryBase::hasLedgerIndex | ( | ) | const |
Check if the ledger entry has a ledger index.
Definition at line 100 of file LedgerEntryBase.h.
| uint16_t xrpl::ledger_entries::LedgerEntryBase::getLedgerEntryType | ( | ) | const |
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.).
Definition at line 114 of file LedgerEntryBase.h.
| std::uint32_t xrpl::ledger_entries::LedgerEntryBase::getFlags | ( | ) | const |
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.
Definition at line 128 of file LedgerEntryBase.h.
| std::shared_ptr< SLE const > xrpl::ledger_entries::LedgerEntryBase::getSle | ( | ) | const |
Get the underlying SLE object.
Provides direct access to the wrapped serialized ledger entry object for cases where the type-safe accessors are insufficient.
Definition at line 142 of file LedgerEntryBase.h.
|
protected |
The underlying serialized ledger entry being wrapped.
Definition at line 149 of file LedgerEntryBase.h.