Added mechanism to understand passed Argument value.
[command.git] / src / main.cpp
1 #include <iostream>
2 #include <string>
3
4 #include "option.h"
5 #include "argument.h"
6 #include "command.h"
7
8 void some_function(std::string) {
9     std::cout << "Some function" << std::endl;
10 }
11
12 int main(int argc, char *argv[]) {
13     command::Command command(argc, argv, {
14         new command::Argument<std::string>("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }),
15         new command::Argument<std::string>("File path", some_function),
16         new command::Option<std::string>("h", "Help", some_function)
17     });
18
19     return 0;
20 }