- po::options_description desc("Allowed options");
- desc.add_options()
- ("help,h", "produce help message")
- ("version,V", "show version")
- ("config", po::value< std::vector<std::string> >(), "xml config")
- ;
-
- po::positional_options_description p;
- p.add("config", -1);
-
- po::variables_map vm;
- po::store(po::command_line_parser(argc, argv).
- options(desc).positional(p).run(), vm);
- po::notify(vm);
-
- if (vm.count("help")) {
- std::cout << desc << "\n";
- return 1;
- }
- if (vm.count("version")) {
- std::cout << "Metaproxy " VERSION "\n";
- return 0;
- }
- xmlDocPtr doc = 0;
- if (vm.count("config"))
- {
- std::vector<std::string> config_fnames =
- vm["config"].as< std::vector<std::string> >();