Class StateLayout

Class Documentation

class StateLayout

Registry mapping semantic field names to stable field identifiers.

Public Functions

inline FieldId add_field(FieldDescriptor descriptor)

Add a field and return its stable semantic identifier.

inline bool has_field(const std::string &name) const

Return whether a field with the given semantic name is registered.

inline FieldId field_id(const std::string &name) const

Look up a field identifier by semantic name.

inline bool contains(const FieldId id) const

Return whether an identifier belongs to this layout.

inline const FieldDescriptor &field(const FieldId id) const

Return the descriptor for a registered field.

inline std::size_t n_fields() const

Return the number of semantic fields in this layout.