1#include <xrpl/beast/utility/instrumentation.h>
2#include <xrpl/protocol/SField.h>
24template <
class... Args>
33#pragma push_macro("UNTYPED_SFIELD")
35#pragma push_macro("TYPED_SFIELD")
38#define UNTYPED_SFIELD(sfName, stiSuffix, fieldValue, ...) \
39 SField const sfName(access, STI_##stiSuffix, fieldValue, std::string_view(#sfName).substr(2).data(), ##__VA_ARGS__);
40#define TYPED_SFIELD(sfName, stiSuffix, fieldValue, ...) \
41 SF_##stiSuffix const sfName( \
42 access, STI_##stiSuffix, fieldValue, std::string_view(#sfName).substr(2).data(), ##__VA_ARGS__);
52#include <xrpl/protocol/detail/sfields.macro>
55#pragma pop_macro("TYPED_SFIELD")
57#pragma pop_macro("UNTYPED_SFIELD")
66 , signingField(signing)
67 , jsonName(fieldName.c_str())
79 , fieldType(STI_UNKNOWN)
82 , fieldMeta(sMD_Never)
85 , jsonName(fieldName.c_str())
100 return *(it->second);
128 return *(it->second);
static SField const & getField(int fieldCode)
std::string const fieldName
static std::unordered_map< std::string, SField const * > knownNameToField
static std::unordered_map< int, SField const * > knownCodeToField
static IsSigning const notSigning
static int compare(SField const &f1, SField const &f2)
SField(SField const &)=delete
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)