Skip to content

Generalize case conversion #585

Description

@cacharle

Right now there is the SnakeCaseToCamelCase and SnakeCaseToPascalCase but in my case the c++ fields are camel case and I'd like to write a toml file in snake case.

I think it'd be a great feature to generalize the case convertion to allow more use cases.

After a quick look, it seems like the 2 processors I mentioned above have very similar code with just one function differing between them.

There could be an interface like rfl::ConvertCase<rfl::SnakeCase, rfl::CamelCase> which would convert snake to camel case if that conversion is available. Or keep the current format with just a base and more conversion functions.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions