add new version of CommandLineParser. add empty docs

This commit is contained in:
AoD314
2012-09-07 13:24:48 +04:00
parent 6a112aa87a
commit 54a202b3d5
26 changed files with 855 additions and 665 deletions

View File

@@ -3,19 +3,23 @@
const char* keys =
{
"{ b |build |false | print complete build info }"
"{ h |help |false | print this help }"
"{ b build | | print complete build info }"
"{ h help | | print this help }"
};
int main(int argc, const char* argv[])
{
cv::CommandLineParser parser(argc, argv, keys);
if (parser.get<bool>("help"))
if (parser.has("help"))
{
parser.printParams();
parser.printMessage();
}
else if (parser.get<bool>("build"))
else if (!parser.check())
{
parser.printErrors();
}
else if (parser.has("build"))
{
std::cout << cv::getBuildInformation() << std::endl;
}
@@ -25,4 +29,4 @@ int main(int argc, const char* argv[])
}
return 0;
}
}