4#include <xrpl/protocol/STLedgerEntry.h>
5#include <xrpl/protocol/STParsedJSON.h>
6#include <xrpl/protocol/jss.h>
7#include <xrpl/protocol_autogen/LedgerEntryBase.h>
8#include <xrpl/protocol_autogen/LedgerEntryBuilderBase.h>
9#include <xrpl/json/json_value.h>
16class DirectoryNodeBuilder;
57 return this->
sle_->at(sfOwner);
69 return this->
sle_->isFieldPresent(sfOwner);
81 return this->
sle_->at(sfTakerPaysCurrency);
93 return this->
sle_->isFieldPresent(sfTakerPaysCurrency);
105 return this->
sle_->at(sfTakerPaysIssuer);
117 return this->
sle_->isFieldPresent(sfTakerPaysIssuer);
129 return this->
sle_->at(sfTakerGetsCurrency);
141 return this->
sle_->isFieldPresent(sfTakerGetsCurrency);
153 return this->
sle_->at(sfTakerGetsIssuer);
165 return this->
sle_->isFieldPresent(sfTakerGetsIssuer);
177 return this->
sle_->at(sfExchangeRate);
189 return this->
sle_->isFieldPresent(sfExchangeRate);
197 SF_VECTOR256::type::value_type
200 return this->
sle_->at(sfIndexes);
208 SF_UINT256::type::value_type
211 return this->
sle_->at(sfRootIndex);
223 return this->
sle_->at(sfIndexNext);
235 return this->
sle_->isFieldPresent(sfIndexNext);
247 return this->
sle_->at(sfIndexPrevious);
259 return this->
sle_->isFieldPresent(sfIndexPrevious);
271 return this->
sle_->at(sfNFTokenID);
283 return this->
sle_->isFieldPresent(sfNFTokenID);
295 return this->
sle_->at(sfPreviousTxnID);
307 return this->
sle_->isFieldPresent(sfPreviousTxnID);
319 return this->
sle_->at(sfPreviousTxnLgrSeq);
331 return this->
sle_->isFieldPresent(sfPreviousTxnLgrSeq);
343 return this->
sle_->at(sfDomainID);
355 return this->
sle_->isFieldPresent(sfDomainID);
388 if (sle->at(sfLedgerEntryType) != ltDIR_NODE)
415 object_[sfTakerPaysCurrency] = value;
426 object_[sfTakerPaysIssuer] = value;
437 object_[sfTakerGetsCurrency] = value;
448 object_[sfTakerGetsIssuer] = value;
459 object_[sfExchangeRate] = value;
503 object_[sfIndexPrevious] = value;
525 object_[sfPreviousTxnID] = value;
536 object_[sfPreviousTxnLgrSeq] = value;
Builder for DirectoryNode ledger entries.
DirectoryNodeBuilder & setIndexes(std::decay_t< typename SF_VECTOR256::type::value_type > const &value)
Set sfIndexes (soeREQUIRED)
DirectoryNodeBuilder(std::shared_ptr< SLE const > sle)
Construct a DirectoryNodeBuilder from an existing SLE object.
DirectoryNodeBuilder & setTakerGetsIssuer(std::decay_t< typename SF_UINT160::type::value_type > const &value)
Set sfTakerGetsIssuer (soeOPTIONAL)
DirectoryNodeBuilder & setDomainID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfDomainID (soeOPTIONAL)
DirectoryNodeBuilder & setPreviousTxnLgrSeq(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPreviousTxnLgrSeq (soeOPTIONAL)
DirectoryNodeBuilder & setTakerGetsCurrency(std::decay_t< typename SF_UINT160::type::value_type > const &value)
Set sfTakerGetsCurrency (soeOPTIONAL)
DirectoryNodeBuilder & setIndexNext(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfIndexNext (soeOPTIONAL)
DirectoryNodeBuilder & setTakerPaysIssuer(std::decay_t< typename SF_UINT160::type::value_type > const &value)
Set sfTakerPaysIssuer (soeOPTIONAL)
DirectoryNodeBuilder & setRootIndex(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfRootIndex (soeREQUIRED)
DirectoryNodeBuilder & setIndexPrevious(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfIndexPrevious (soeOPTIONAL)
DirectoryNodeBuilder & setNFTokenID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfNFTokenID (soeOPTIONAL)
DirectoryNodeBuilder & setPreviousTxnID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfPreviousTxnID (soeOPTIONAL)
DirectoryNodeBuilder(std::decay_t< typename SF_VECTOR256::type::value_type > const &indexes, std::decay_t< typename SF_UINT256::type::value_type > const &rootIndex)
Construct a new DirectoryNodeBuilder with required fields.
DirectoryNodeBuilder & setExchangeRate(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfExchangeRate (soeOPTIONAL)
DirectoryNodeBuilder & setTakerPaysCurrency(std::decay_t< typename SF_UINT160::type::value_type > const &value)
Set sfTakerPaysCurrency (soeOPTIONAL)
DirectoryNodeBuilder & setOwner(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Ledger entry-specific field setters.
DirectoryNode build(uint256 const &index)
Build and return the completed DirectoryNode wrapper.
Ledger Entry: DirectoryNode.
SF_UINT256::type::value_type getRootIndex() const
Get sfRootIndex (soeREQUIRED)
protocol_autogen::Optional< SF_UINT64::type::value_type > getIndexNext() const
Get sfIndexNext (soeOPTIONAL)
protocol_autogen::Optional< SF_ACCOUNT::type::value_type > getOwner() const
Get sfOwner (soeOPTIONAL)
bool hasIndexPrevious() const
Check if sfIndexPrevious is present.
protocol_autogen::Optional< SF_UINT64::type::value_type > getIndexPrevious() const
Get sfIndexPrevious (soeOPTIONAL)
bool hasPreviousTxnID() const
Check if sfPreviousTxnID is present.
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerPaysCurrency() const
Get sfTakerPaysCurrency (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT256::type::value_type > getNFTokenID() const
Get sfNFTokenID (soeOPTIONAL)
bool hasTakerPaysCurrency() const
Check if sfTakerPaysCurrency is present.
bool hasTakerGetsIssuer() const
Check if sfTakerGetsIssuer is present.
DirectoryNode(std::shared_ptr< SLE const > sle)
Construct a DirectoryNode ledger entry wrapper from an existing SLE object.
bool hasIndexNext() const
Check if sfIndexNext is present.
bool hasDomainID() const
Check if sfDomainID is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getPreviousTxnLgrSeq() const
Get sfPreviousTxnLgrSeq (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerGetsIssuer() const
Get sfTakerGetsIssuer (soeOPTIONAL)
bool hasPreviousTxnLgrSeq() const
Check if sfPreviousTxnLgrSeq is present.
bool hasTakerGetsCurrency() const
Check if sfTakerGetsCurrency is present.
SF_VECTOR256::type::value_type getIndexes() const
Get sfIndexes (soeREQUIRED)
protocol_autogen::Optional< SF_UINT256::type::value_type > getDomainID() const
Get sfDomainID (soeOPTIONAL)
bool hasExchangeRate() const
Check if sfExchangeRate is present.
bool hasNFTokenID() const
Check if sfNFTokenID is present.
protocol_autogen::Optional< SF_UINT64::type::value_type > getExchangeRate() const
Get sfExchangeRate (soeOPTIONAL)
bool hasOwner() const
Check if sfOwner is present.
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerGetsCurrency() const
Get sfTakerGetsCurrency (soeOPTIONAL)
bool hasTakerPaysIssuer() const
Check if sfTakerPaysIssuer is present.
protocol_autogen::Optional< SF_UINT160::type::value_type > getTakerPaysIssuer() const
Get sfTakerPaysIssuer (soeOPTIONAL)
static constexpr LedgerEntryType entryType
protocol_autogen::Optional< SF_UINT256::type::value_type > getPreviousTxnID() const
Get sfPreviousTxnID (soeOPTIONAL)
Base class for type-safe ledger entry wrappers.
std::shared_ptr< SLE const > sle_
The underlying serialized ledger entry being wrapped.
Base class for all ledger entry builders.
LedgerEntryType
Identifiers for on-ledger objects.