X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain.cpp;h=80aeb274803d70e63d9a90b7b056586a2c9bd847;hb=dd5fbed80e02dbb68a864fb59723dd106eebe14f;hp=37ca36f9d6cabd4ceb67bf239b8a6a9f3c0149d8;hpb=121c2f8b8cbcae79a82093421282b0526ddd17c1;p=command.git diff --git a/src/main.cpp b/src/main.cpp index 37ca36f..80aeb27 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,10 +1,18 @@ +#include +#include -int main() { +#include "option.h" +#include "argument.h" +#include "command.h" + + +int main(int argc, char *argv[]) { command::Command command(argc, argv, { - command::Option("f", "File path", [](std::string value)->void { cout << "Sth: " << value << endl; }), - command::Argument("File path", []()->void { cout << "Sth: " << value << endl; }), - command::Option("help", "Help description", [](void)->void { cout << "Sth: " << value << endl; }), - command::Option("verbose", "Verbose option description", &myClass->verbose) + new command::Argument("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }), + new command::Argument("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }), + new command::Argument("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }), + new command::Argument("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }), + new command::Argument("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }) }); return 0;