Commit 4b81d69
committed
YT-CPPAP-61: Add subparsers support
- Extended the `argument_parser` class with members and functions allowing users to manage subparsers
- Aligned the argument parsing functionality:
- A parser tries to match the first argument from its input argument range to a subparser
- If a match is found, the corresponding subparser is invoked with the remaining arguments
- If no match is found, the current parser finalizes parsing arguments
- Aligned the argument parsing functionality to allow forward ranges only
- Added the `name` and `program_name` attribute accessor functions in `argument_parser`
- Restricted the creation of positional arguments to using only one argument name
- Added the possibility to bind positional arguments to argument groups
- Added an `is_used(arg_name)` method for checking the usage status of an argument
- Added an `o_version` default argument which prints the parser's version info
- Renamed the `argument_descriptor` class to `help_builder`
- Fixed an error where the requirements of all arguments within a mutually exclusive group were verified, which caused unexpected exceptions
- Added the `logging_mode` and `ap_git` demo projects1 parent 4fe32f0 commit 4b81d69
File tree
21 files changed
+880
-408
lines changed- docs
- include/ap
- action
- detail
- util
- tests
- include
- source
21 files changed
+880
-408
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| |||
Submodule cpp-ap-demo updated 21 files
- BUILD.bazel+2
- CMakeLists.txt+2
- README.md+10-5
- ap_git/BUILD.bazel+6
- ap_git/CMakeLists.txt+1
- ap_git/README.md+72
- ap_git/main.cpp+120
- file_merger/README.md+1-1
- file_merger/main.cpp+1-1
- logging_mode/README.md+2-3
- logging_mode/main.cpp+1-1
- message_logger/BUILD.bazel+6
- message_logger/CMakeLists.txt+1
- message_logger/README.md+38
- message_logger/main.cpp+47
- numbers_converter/README.md+2-2
- numbers_converter/main.cpp+1-1
- power_calculator/README.md+1-1
- power_calculator/main.cpp+1-1
- verbosity/README.md+2-2
- verbosity/main.cpp+2-2
0 commit comments