20 #ifndef RIPPLE_PROTOCOL_KNOWNFORMATS_H_INCLUDED
21 #define RIPPLE_PROTOCOL_KNOWNFORMATS_H_INCLUDED
23 #include <ripple/basics/contract.h>
24 #include <ripple/protocol/SOTemplate.h>
25 #include <boost/container/flat_map.hpp>
38 template <
class KeyType>
58 "KnownFormats KeyType must be integral or enum.");
116 if (result !=
nullptr)
117 return result->getType();
118 Throw<std::runtime_error>(
"Unknown format name");
127 auto const itr =
types_.find(type);
152 auto const itr =
names_.find(name);
173 formats_.emplace_front(name, type, uniqueFields, commonFields);
188 boost::container::flat_map<std::string, Item const*>
names_;
189 boost::container::flat_map<KeyType, Item const*>
types_;
Defines the fields and their attributes within a STObject.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.