summaryrefslogtreecommitdiff
path: root/cli/cli
AgeCommit message (Collapse)AuthorFilesLines
2021-08-09ReviewBoris Kolpackov1-14/+5
2021-08-09Use ad hoc recipe for parsing code and documentation generatingKaren Arutyunov1-32/+45
2021-08-03Add support for tracking argument/option positionBoris Kolpackov3-42/+175
The scanner interface now provides the position() function that returns a monotonically-increasing number which, if stored, can later be used to determine the relative position of the arguments. There is also now a parser implementation for std::pair<T, std::size_t> which parses the value T into the first half of the pair and stores the option position in the second half. Together, this can be used to establish the relative position of different options, for example: class options { std::vector<std::pair<std::uint64_t, std::size>> --config-id; std::vector<std::pair<std::string, std::size>> --config-name; }; cli::argv_scanner scan (argc, argv); options ops (scan); // Iterate over --config-id and --config-name options in the order // specified by the user. // auto ii (ops.config_id ().begin ()); auto ni (ops.config_name ().begin ()); for (size_t i (0), n (scan.position ()); i != n; ++i) { if (ii != ops.config_id ().end () && ii->second == i) { // Handle *ii. ++ii; } if (ni != ops.config_name ().end () && ni->second == i) { // Handle *ni. ++ni; } }
2021-02-24Adapt to cutl/ to libcutl/ renameKaren Arutyunov13-20/+20
2020-12-08Regenerate options parsing codeKaren Arutyunov2-139/+155
2020-12-08Complete options file path using referencing file path as baseKaren Arutyunov1-2/+17
2020-10-05Add missing spaces in generated codeKaren Arutyunov1-2/+2
2020-09-12Fix generated set and map parsers so that comparison predicate can also be ↵Karen Arutyunov1-13/+13
specified
2020-06-19Fix misleading indentationBoris Kolpackov1-2/+2
2020-06-09Add name to metadata for cli executableBoris Kolpackov2-0/+2
2020-06-09Add metadata variable prefix for cli executableKaren Arutyunov2-2/+2
2020-05-28Get rid of trailing spaces in generated codeBoris Kolpackov3-90/+98
2020-04-29Add --suppress-undocumented for usage and regenerateBoris Kolpackov2-3/+1
2020-04-27Update metadata protocolBoris Kolpackov7-15/+49
2020-04-27Separate tests and examples into individual packagesKaren Arutyunov74-0/+21812
Also make cli module to be explicitly enabled via the config.cli configuration variable.