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

--info flag or program #490

Open
pbauman opened this issue May 1, 2017 · 0 comments
Open

--info flag or program #490

pbauman opened this issue May 1, 2017 · 0 comments

Comments

@pbauman
Copy link
Member

pbauman commented May 1, 2017

I was thinking that maybe a more maintainable strategy (i.e. it'll actually get done...) for user documentation is actually do it in the code and then the user can do something like grins --info or maybe a separate grins-info program and we just dump out all the things. Or grins --info physics to get descriptions of all the Physics classes and their required options, etc.

I was leaning towards a separate program to keep the main program clean and not having to check if --info is on the command line and do different things (which then the user may be required to do if they did some module extension since if there's a --info, we probably don't want to do grins.run()).

At any rate, was thinking we can have a static void Physics::all_info( std::ostream & ) method (and similar for other classes) where the implementation just loops through all the registered Physics objects and calls virtual void Physics::info( std::ostream & ) const =0 implementations. Pure virtual so it has to be implemented. And then each implementation is just documentation about what the Physics is, it's options, etc.

Hmm, this would give us all the Physics the user asked for in input, but it would be more useful to get info about all Physics registered with the PhysicsFactory. Need to think a bit about how to do that.

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

No branches or pull requests

1 participant