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
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