7 #include "multiValue.h"
10 using namespace command;
12 void argument_function(bool a) {
13 std::cout << "Argument: " << a << std::endl;
16 void option_function(std::string a) {
17 std::cout << "Help function " << a << std::endl;
20 void void_function(void) {
21 std::cout << "Void function " << std::endl;
24 int main(int argc, char *argv[]) {
26 Command command(argc, argv, {
27 // new Argument<std::string>("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }),
28 new Required(new MultiValue("-", new Argument<bool>("Input values", argument_function))),
29 new MultiValue(",", new Option<std::string>("f", "Optional file", option_function)),
30 new Option<void>("h", "Help", void_function)
34 catch(const std::exception & e) {
35 std::cout << e.what() << std::endl;