20#include <xrpl/beast/utility/instrumentation.h>
21#include <xrpl/protocol/SField.h>
42template <
class... Args>
52#pragma push_macro("UNTYPED_SFIELD")
54#pragma push_macro("TYPED_SFIELD")
57#define UNTYPED_SFIELD(sfName, stiSuffix, fieldValue, ...) \
58 SField const sfName( \
62 std::string_view(#sfName).substr(2).data(), \
64#define TYPED_SFIELD(sfName, stiSuffix, fieldValue, ...) \
65 SF_##stiSuffix const sfName( \
69 std::string_view(#sfName).substr(2).data(), \
80#include <xrpl/protocol/detail/sfields.macro>
83#pragma pop_macro("TYPED_SFIELD")
85#pragma pop_macro("UNTYPED_SFIELD")
100 , signingField(signing)
101 , jsonName(fieldName.c_str())
108 , fieldType(STI_UNKNOWN)
110 , fieldMeta(sMD_Never)
113 , jsonName(fieldName.c_str())
125 return *(it->second);
SField(SField const &)=delete
static std::map< int, SField const * > knownCodeToField
std::string const fieldName
static IsSigning const notSigning
static int compare(const SField &f1, const SField &f2)
static const SField & getField(int fieldCode)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
SField const sfIndex(access, STI_UINT256, 258, "index")
static SField::private_access_tag_t access
int field_code(SerializedTypeID id, int index)
SField const sfHash(access, STI_UINT256, 257, "hash")
private_access_tag_t()=default
TypedField(private_access_tag_t pat, Args &&... args)