Update example.
[command.git] / README
1 Command, a C++ library for handling command line arguments
2
3 Designing to be used like follows:
4
5 Example:
6
7     void some_function(std::string str) {
8         std::cout << "Some function" << std::endl;
9     }
10
11     command::Command command(argc, argv, {
12         command::Option<std::string>("f", "File path", [](std::string value)->void { cout << "Sth: " << value << endl; }),
13         command::Argument<std::string>("File path", []()->void { cout << "Sth: " << value << endl; }),
14         command::Option<void>("help", "Help description", [](void)->void { cout << "Sth: " << value << endl; }),
15         command::Option<void>("verbose", "Verbose option description", &myClass->verbose),
16         command::Option<void>("verbose", "Verbose option description", some_function)
17     });
18