1#include <xrpl/protocol/STTakesAsset.h>
3#include <xrpl/protocol/STLedgerEntry.h>
11 for (
int i = 0; i < sle.
getCount(); ++i)
14 SField const& field = entry.getFName();
17 auto const type = entry.getSType();
19 if (type == STI_NOTPRESENT)
25 auto const style = sle.
getStyle(ta.getFName());
26 XRPL_ASSERT_PARTS(style !=
soeINVALID,
"xrpl::associateAsset",
"valid template element style");
28 XRPL_ASSERT_PARTS(style !=
soeDEFAULT || !ta.
isDefault(),
"xrpl::associateAsset",
"non-default value");
29 ta.associateAsset(asset);
A type which can be exported to a well known binary format.
virtual bool isDefault() const
SOEStyle getStyle(SField const &field) const
STBase & getIndex(int offset)
void makeFieldAbsent(SField const &field)
Intermediate class for any STBase-derived class to store an Asset.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void associateAsset(STLedgerEntry &sle, Asset const &asset)
Associate an Asset with all sMD_NeedsAsset fields in a ledger entry.