diff --git a/src/lib/cli.cpp b/src/lib/cli.cpp index 8ec37c9..fd10870 100644 --- a/src/lib/cli.cpp +++ b/src/lib/cli.cpp @@ -189,6 +189,15 @@ namespace CLI { } } + ArgumentsParser::ArgumentsParser(int argc, const char* const argv[], std::vector flags, std::vector unpositionalArguments, std::vector positionalArguments, std::string description): ArgumentsParser::ArgumentsParser(argc, argv, flags, unpositionalArguments, positionalArguments) { + this->description = description; + } + + ArgumentsParser::ArgumentsParser(int argc, const char* const argv[], std::vector flags, std::vector unpositionalArguments, std::vector positionalArguments, std::string description, std::string additionalInfo): ArgumentsParser::ArgumentsParser(argc, argv, flags, unpositionalArguments, positionalArguments) { + this->description = description; + this->additionalInfo = additionalInfo; + } + ArgumentsParser::~ArgumentsParser() { //TODO: check that this actually runs for (auto const& [shortName, flag]: this->flagsByShortName) { diff --git a/src/lib/cli.h++ b/src/lib/cli.h++ index 513a03e..c306edc 100644 --- a/src/lib/cli.h++ +++ b/src/lib/cli.h++ @@ -68,6 +68,8 @@ namespace CLI { std::map argumentsByShortName; std::map argumentsByLongName; std::vector positionalArguments; + std::string description; + std::string additionalInfo; public: std::string programName; @@ -76,6 +78,8 @@ namespace CLI { // using int here bc that's how main() is defined ArgumentsParser(int argc, const char* const argv[], std::vector flags, std::vector unpositionalArguments, std::vector positionalArguments); + ArgumentsParser(int argc, const char* const argv[], std::vector flags, std::vector unpositionalArguments, std::vector positionalArguments, std::string description); + ArgumentsParser(int argc, const char* const argv[], std::vector flags, std::vector unpositionalArguments, std::vector positionalArguments, std::string description, std::string additionalInfo); ~ArgumentsParser(); ErrorOr getFlag(char shortName);