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

Include an array of variable/parameter names (string) in each model template #1

Open
angellareo opened this issue Sep 28, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@angellareo
Copy link
Member

Include, in each model template, an array containing the names of its variables and parameters:
static const std::string param_names[]={"a", "b", "c", "d"};
static const std::string var_names[]={"u", "v"};
This allows to obtain (as strings) the names of the variables/parameters (which are now only named values from the enum), which is interesting e.g. for generic loading of the initial configuration.

Also, consider the pros/cons of using a map instead of the enum+array.

More alternatives in: https://stackoverflow.com/questions/7354305/c-using-x-macro-to-define-enum-and-string-array-inside-class

@angellareo angellareo added the enhancement New feature or request label Sep 28, 2022
@angellareo angellareo self-assigned this Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant