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

Add some sort of parse() utility function #8

Closed
jayjaybillings opened this issue Nov 23, 2016 · 1 comment
Closed

Add some sort of parse() utility function #8

jayjaybillings opened this issue Nov 23, 2016 · 1 comment
Assignees

Comments

@jayjaybillings
Copy link
Owner

Parsing is kind of dirty right now. It can be done in a stereotypically annoying way

LocalParser<T> parser;
parser.setSource(fileName);
parser.parse();
shared_ptr<T> myData = parser.getData();

or a shorter but more confusing way

auto parser = build<LocalParser<vector<T>>, const string &>(fileName);
auto myData = speciesParser.getData();

What I would like to have is something like

auto myData = parse<T>(filename);
@jayjaybillings
Copy link
Owner Author

Done. I like this a lot! It makes client code super succinct.

jayjaybillings pushed a commit that referenced this issue Nov 25, 2016
Fixed #8 by adding parse<T>() in parse.h so that we have streamlined
parsing for structured blocks. Added ReactionNetwork and an initial test
for it, but not the flux calculation. Merged INIPropertyParser.cpp into
the header to do templating better. Updated documentation to reflect all
of these changes and various tests.

Signed-off-by: Jay Jay Billings <billingsjj@ornl.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant