1#include <xrpl/protocol/STTakesAsset.h>
3#include <xrpl/beast/utility/instrumentation.h>
4#include <xrpl/protocol/Asset.h>
5#include <xrpl/protocol/SField.h>
6#include <xrpl/protocol/SOTemplate.h>
7#include <xrpl/protocol/STBase.h>
8#include <xrpl/protocol/STLedgerEntry.h>
16 for (
int i = 0; i < sle.
getCount(); ++i)
19 SField const& field = entry.getFName();
22 auto const type = entry.getSType();
24 if (type == STI_NOTPRESENT)
30 auto const style = sle.
getStyle(ta.getFName());
32 style !=
SoeInvalid,
"xrpl::associateAsset",
"valid template element style");
36 "xrpl::associateAsset",
38 ta.associateAsset(asset);
static constexpr auto kSmdNeedsAsset
A type which can be exported to a well known binary format.
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.