20#include <xrpl/basics/contract.h>
21#include <xrpl/protocol/SField.h>
22#include <xrpl/protocol/SOTemplate.h>
33 : indices_(
SField::getNumFields() + 1, -1)
47 if (sField.getNum() <= 0 || sField.getNum() >=
indices_.
size())
48 Throw<std::runtime_error>(
"Invalid field index for SOTemplate.");
53 Throw<std::runtime_error>(
"Duplicate field index for SOTemplate.");
67 Throw<std::runtime_error>(
"Invalid field index for getIndex().");
std::vector< SOElement > elements_
std::vector< int > indices_
int getIndex(SField const &) const
Retrieve the position of a named field.
SOTemplate(SOTemplate &&other)=default
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.