You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to figure out some way to do an enumerated type of input parameter. Something where you have multiple choices... and when the input file syntax prints out it shows you the choices... and if you supply something other than one of the choices there is an error.
I honestly don't know quite how to achieve this... but it must be possible!
The text was updated successfully, but these errors were encountered:
I've looked into this and don't believe there is a completely transparent way to accomplish this. There doesn't exist a way to get back all valid options from a raw enum in C++. We could however create a MOOSE_Enum or some other wrapped class where we could do something like this. I'm reclassifying priority for now.
We've now talked about this some more and believe that we should go ahead and create a MooseEnum type that does all the right stuff. Reclassifying the priority up again.
I'm attaching a quick mockup of a class and driver that might provide a solution. It allows you to create an "enum" inline and still use it in a switch statement.
I would like to figure out some way to do an enumerated type of input parameter. Something where you have multiple choices... and when the input file syntax prints out it shows you the choices... and if you supply something other than one of the choices there is an error.
I honestly don't know quite how to achieve this... but it must be possible!
The text was updated successfully, but these errors were encountered: