Save working version Command library.
[command.git] / src / main.cpp
index 37ca36f9d6cabd4ceb67bf239b8a6a9f3c0149d8..80aeb274803d70e63d9a90b7b056586a2c9bd847 100644 (file)
@@ -1,10 +1,18 @@
+#include <iostream>
+#include <string>
 
-int main() {
+#include "option.h"
+#include "argument.h"
+#include "command.h"
+
+
+int main(int argc, char *argv[]) {
     command::Command command(argc, argv, {
-        command::Option<std::string>("f", "File path", [](std::string value)->void { cout << "Sth: " << value << endl; }),
-        command::Argument<std::string>("File path", []()->void { cout << "Sth: " << value << endl; }),
-        command::Option<void>("help", "Help description", [](void)->void { cout << "Sth: " << value << endl; }),
-        command::Option<void>("verbose", "Verbose option description", &myClass->verbose)
+        new command::Argument<std::string>("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }),
+        new command::Argument<std::string>("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }),
+        new command::Argument<std::string>("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }),
+        new command::Argument<std::string>("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }),
+        new command::Argument<std::string>("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; })
     });
 
     return 0;