1#include <xrpl/basics/contract.h>
2#include <xrpl/protocol/SField.h>
3#include <xrpl/protocol/SOTemplate.h>
22 : indices_(
SField::getNumFields() + 1, -1)
37 if (sField.getNum() <= 0 || sField.getNum() >=
indices_.
size())
38 Throw<std::runtime_error>(
"Invalid field index for SOTemplate.");
43 Throw<std::runtime_error>(
"Duplicate field index for SOTemplate.");
57 Throw<std::runtime_error>(
"Invalid field index for getIndex().");
T back_inserter(T... args)
Defines the fields and their attributes within a STObject.
std::vector< int > indices_
int getIndex(SField const &) const
Retrieve the position of a named field.
SOTemplate(SOTemplate &&other)=default
std::vector< SOElement > elements_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.