nw::RuleTypeArray

template<typename RuleType, typename RuleTypeInfo>
struct RuleTypeArray

Base template for rule type arrays.

Template Parameters:
  • RuleType

  • RuleTypeInfo

Public Types

using map_type = absl::flat_hash_map<InternedString, RuleType, InternedStringHash, InternedStringEq, Allocator<std::pair<const InternedString, const RuleType>>>

Public Functions

inline RuleTypeArray(MemoryResource *allocator = kernel::global_allocator())
inline const RuleTypeInfo *get(RuleType type) const noexcept
inline void clear()
inline bool is_valid(RuleType type) const noexcept
inline RuleType from_constant(StringView constant) const

Public Members

PVector<RuleTypeInfo> entries
map_type constant_to_index