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

Builtin types #12

Merged
merged 17 commits into from Aug 29, 2020
Merged

Builtin types #12

merged 17 commits into from Aug 29, 2020

Conversation

ggabriel96
Copy link
Owner

@ggabriel96 ggabriel96 commented Aug 29, 2020

  • establishes a list of supported ("built-in") types which are the possibilities of a std::variant that is held by Arg to, among other things, support default values
  • std::string is the default type for arguments
  • initial implementation of actions: assign (the default) and append
  • parsing directly builds ArgMap instead of the intermediate ParseResult
  • bumped version number (I always forget to update it :()
  • some code reorganization: split types.hpp into args.hpp and program.hpp

- removed ParseResult (parsing directly into ArgMap)
- list of supported types in BuiltinTypes
- Arg has std::variant default value member
- Arg stores its action
- implemented very basic assign and append actions
- removed Program::assign_* member functions
- temporarily not assigning default values when setting parsed arguments
- just updated unit tests to pass, gotta re-do them
- moved Program to its own .hpp/.cpp files
- types.hpp/.cpp renamed to args.hpp/.cpp, added "section comments"
- opzioni::parsing::parse_option moved to program.hpp, not in parsing namespace anymore
- include cleanup
- removed unused opzioni.cpp and types.test.cpp
@ggabriel96 ggabriel96 added the enhancement New feature or request label Aug 29, 2020
@ggabriel96 ggabriel96 self-assigned this Aug 29, 2020
@ggabriel96 ggabriel96 merged commit c456d5a into main Aug 29, 2020
@ggabriel96 ggabriel96 deleted the builtin-types branch August 29, 2020 18:33
@ggabriel96 ggabriel96 linked an issue Aug 29, 2020 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

The return of templated Arg?
1 participant