7#include <unordered_map>
59 std::filesystem::path header_path,
61 gsl::not_null<const TextFormatter *> format,
62 gsl::not_null<const UserDiagnostics *> diag)
63 : header_path_{std::move(header_path)}, definition_{std::move(definition)}, format_{format}, diag_{diag}
90 template <
typename Entry>
93 std::filesystem::path header_path_;
97 mutable bool loaded_{
false};
98 mutable bool load_failed_{
false};
99 mutable std::unique_ptr<CParserFacade> driver_;
100 mutable std::unordered_map<std::string, std::uint32_t> name_to_value_;
101 mutable std::unordered_map<std::uint32_t, std::string> value_to_name_;
102 mutable std::unordered_map<std::string, SourcePosition> name_to_position_;
103 mutable std::unordered_map<std::uint32_t, SourcePosition> value_to_position_;
123 const std::filesystem::path &project_root,
124 const Schema &schema,
125 gsl::not_null<const TextFormatter *> format,
126 gsl::not_null<const UserDiagnostics *> diag);
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Abstract interface for providing two-way name/value mappings for an enumerated attribute field.
Abstract base class for applying text styling with context-aware formatting.
Abstract class for structured error reporting and diagnostic output.
std::map< std::string, std::unique_ptr< EnumMapProvider >, std::less<> > ProviderMap
Maps schema field names to the provider that names that field's values.
ProviderMap build_provider_map(const std::filesystem::path &project_root, const Schema &schema, gsl::not_null< const TextFormatter * > format, gsl::not_null< const UserDiagnostics * > diag)
Builds a header provider for every provider-backed field in a schema.
The self-contained description a header enum provider needs to scan and validate values.