Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMREX_ENUM and ParmParse support for enum class #4069

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

WeiqunZhang
Copy link
Member

This adds AMREX_ENUM that can be used to define enum class with reflection. The new feature allows us to support enum class in ParmParse.

This adds AMREX_ENUM that can be used to define enum class with
reflection. The new feature allows us to support enum class in ParmParse.
@WeiqunZhang WeiqunZhang merged commit 8535675 into AMReX-Codes:development Aug 14, 2024
71 of 72 checks passed
@WeiqunZhang WeiqunZhang deleted the amrex_enum branch August 14, 2024 18:14
@baperry2 baperry2 mentioned this pull request Aug 29, 2024
5 tasks
WeiqunZhang pushed a commit that referenced this pull request Sep 4, 2024
## Summary

- The ParmParse functions for AMReX Enums added in #4069 did not carry
the optional arguments found in other ParmParse functions. Those are
added so that, for example, querying an enum has the same interface as
querying other types.
- These functions shouldn't modify the ParmParse object, so they are
made `const`
- The `prefixedName` function is made a public member instead of a
protected member.

## Additional background

The use case for these changes is
erf-model/ERF#1772
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.

2 participants