Skip to content

Add rfl::EnumNames<E> wire-name overrides, TransformEnumNames processors, and literal_from_table_t - #123

Open
clockblocker wants to merge 2 commits into
mainfrom
enum-wire-names
Open

clockblocker wants to merge 2 commits into
mainfrom
enum-wire-names

Conversation

@clockblocker

Copy link
Copy Markdown
Owner

Summary

Adds enum wire-name customization across JSON, CLI, Generic, XML, YAML, and JSON Schema without duplicating enumerators as rfl::Literal<...>:

  • rfl::EnumNames<E> trait supporting overrides (static contiguous range or borrowed-range overrides() function, including out-of-range enumerators) and transform (EnumNameTransform constant or static callable returning std::string/std::string_view).
  • rfl::TransformEnumNames<...> processors (EnumSnakeCaseToKebabCase, EnumSnakeCaseToCamelCase, EnumSnakeCaseToPascalCase, EnumToLowerCase, EnumToUpperCase) with locale-independent ASCII transforms and recursive nested Processors<...> support.
  • Normalized <EnumType, EnumNameTransform> internal templates in ParserEnum and enums.hpp to avoid per-ProcessorsType instantiation bloat, plus exception-safe ParserEnum::read and unified wire-name deduplication.
  • rfl::get_enum_wire_names<E, ProcessorsType>() and rfl::literal_from_table_t<kTable> helper.

Verification

  • Full CTest suite under -Wall -Werror + REFLECTCPP_STRICT_WARNINGS=ON: 665/665 passed.
  • Passed Neon High Judge review (APPROVE WITH NITS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant