|
xrpld
|
A view into a ledger. More...
#include <ReadView.h>


Classes | |
| struct | SlesType |
| struct | TxsType |
Public Types | |
| using | tx_type = std::pair<std::shared_ptr<STTx const>, std::shared_ptr<STObject const>> |
| using | key_type = uint256 |
| using | mapped_type = SLE::const_pointer |
Public Member Functions | |
| virtual | ~ReadView ()=default |
| ReadView & | operator= (ReadView &&other)=delete |
| ReadView & | operator= (ReadView const &other)=delete |
| ReadView () | |
| ReadView (ReadView const &other) | |
| ReadView (ReadView &&other) | |
| virtual LedgerHeader const & | header () const =0 |
| Returns information about the ledger. | |
| virtual bool | open () const =0 |
| Returns true if this reflects an open ledger. | |
| NetClock::time_point | parentCloseTime () const |
| Returns the close time of the previous ledger. | |
| LedgerIndex | seq () const |
| Returns the sequence number of the base ledger. | |
| virtual Fees const & | fees () const =0 |
| Returns the fees for the base ledger. | |
| virtual Rules const & | rules () const =0 |
| Returns the tx processing rules. | |
| virtual bool | exists (Keylet const &k) const =0 |
| Determine if a state item exists. | |
| virtual std::optional< key_type > | succ (key_type const &key, std::optional< key_type > const &last=std::nullopt) const =0 |
| Return the key of the next state item. | |
| virtual SLE::const_pointer | read (Keylet const &k) const =0 |
| Return the state item associated with a key. | |
| virtual STAmount | balanceHookIOU (AccountID const &account, AccountID const &issuer, STAmount const &amount) const |
| virtual STAmount | balanceHookMPT (AccountID const &account, MPTIssue const &issue, std::int64_t amount) const |
| virtual STAmount | balanceHookSelfIssueMPT (MPTIssue const &issue, std::int64_t amount) const |
| virtual std::uint32_t | ownerCountHook (AccountID const &account, std::uint32_t count) const |
| virtual std::unique_ptr< SlesType::iter_base > | slesBegin () const =0 |
| virtual std::unique_ptr< SlesType::iter_base > | slesEnd () const =0 |
| virtual std::unique_ptr< SlesType::iter_base > | slesUpperBound (key_type const &key) const =0 |
| virtual std::unique_ptr< TxsType::iter_base > | txsBegin () const =0 |
| virtual std::unique_ptr< TxsType::iter_base > | txsEnd () const =0 |
| virtual bool | txExists (key_type const &key) const =0 |
| Returns true if a tx exists in the tx map. | |
| virtual tx_type | txRead (key_type const &key) const =0 |
| Read a transaction from the tx map. | |
Public Attributes | |
| SlesType | sles |
| Iterable range of ledger state items. | |
| TxsType | txs |
A view into a ledger.
This interface provides read access to state and transaction items. There is no checkpointing or calculation of metadata.
Definition at line 30 of file ReadView.h.
| using xrpl::ReadView::tx_type = std::pair<std::shared_ptr<STTx const>, std::shared_ptr<STObject const>> |
Definition at line 33 of file ReadView.h.
| using xrpl::ReadView::key_type = uint256 |
Definition at line 35 of file ReadView.h.
Definition at line 37 of file ReadView.h.
|
virtualdefault |
| xrpl::ReadView::ReadView | ( | ) |
Definition at line 68 of file ReadView.h.
| xrpl::ReadView::ReadView | ( | ReadView const & | other | ) |
Definition at line 72 of file ReadView.h.
| xrpl::ReadView::ReadView | ( | ReadView && | other | ) |
Definition at line 76 of file ReadView.h.
|
nodiscardpure virtual |
Returns information about the ledger.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
Returns true if this reflects an open ledger.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscard |
Returns the close time of the previous ledger.
Definition at line 90 of file ReadView.h.
|
nodiscard |
Returns the sequence number of the base ledger.
Definition at line 97 of file ReadView.h.
|
nodiscardpure virtual |
Returns the fees for the base ledger.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
Returns the tx processing rules.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
Determine if a state item exists.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
Return the key of the next state item.
This returns the key of the first state item whose key is greater than the specified key. If no such key is present, std::nullopt is returned.
If last is engaged, returns std::nullopt when the key returned would be outside the open interval (key, last).
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, and xrpl::OpenView.
|
nodiscardpure virtual |
Return the state item associated with a key.
Effects: If the key exists, gives the caller ownership of the non-modifiable corresponding SLE.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardvirtual |
Reimplemented in xrpl::PaymentSandbox.
Definition at line 155 of file ReadView.h.
|
nodiscardvirtual |
Reimplemented in xrpl::PaymentSandbox.
Definition at line 165 of file ReadView.h.
|
nodiscardvirtual |
Reimplemented in xrpl::PaymentSandbox.
Definition at line 175 of file ReadView.h.
|
nodiscardvirtual |
Reimplemented in xrpl::PaymentSandbox.
Definition at line 186 of file ReadView.h.
|
nodiscardpure virtual |
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
|
nodiscardpure virtual |
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
|
nodiscardpure virtual |
Returns true if a tx exists in the tx map.
A tx exists in the map if it is part of the base ledger, or if it is a newly inserted tx.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, and xrpl::OpenView.
Read a transaction from the tx map.
If the view represents an open ledger, the metadata object will be empty.
Implemented in xrpl::detail::ApplyViewBase, xrpl::detail::CachedViewImpl, xrpl::Ledger, and xrpl::OpenView.
| SlesType xrpl::ReadView::sles |
Iterable range of ledger state items.
Definition at line 239 of file ReadView.h.
| TxsType xrpl::ReadView::txs |
Definition at line 242 of file ReadView.h.