1#include <xrpl/basics/contract.h>
2#include <xrpl/protocol/SField.h>
3#include <xrpl/protocol/SOTemplate.h>
14 : indices_(
SField::getNumFields() + 1, -1)
28 if (sField.getNum() <= 0 || sField.getNum() >=
indices_.
size())
29 Throw<std::runtime_error>(
"Invalid field index for SOTemplate.");
34 Throw<std::runtime_error>(
"Duplicate field index for SOTemplate.");
48 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.