| 9 | #include <string> |
| 10 | |
| 11 | int main(int argc, char **argv) { |
| 12 | |
| 13 | CLI::App app("Vision Application"); |
| 14 | app.set_help_all_flag("--help-all", "Expand all help"); |
| 15 | app.add_flag("--version", "Get version"); |
| 16 | |
| 17 | CLI::App *cameraApp = app.add_subcommand("camera", "Configure the app camera"); |
| 18 | cameraApp->require_subcommand(0, 1); // 0 (default) or 1 camera |
| 19 | |
| 20 | std::string mvcamera_config_file = "mvcamera_config.json"; |
| 21 | CLI::App *mvcameraApp = cameraApp->add_subcommand("mvcamera", "MatrixVision Camera Configuration"); |
| 22 | mvcameraApp->add_option("-c,--config", mvcamera_config_file, "Config filename") |
| 23 | ->capture_default_str() |
| 24 | ->check(CLI::ExistingFile); |
| 25 | |
| 26 | std::string mock_camera_path; |
| 27 | CLI::App *mockcameraApp = cameraApp->add_subcommand("mock", "Mock Camera Configuration"); |
| 28 | mockcameraApp->add_option("-p,--path", mock_camera_path, "Path")->required()->check(CLI::ExistingPath); |
| 29 | |
| 30 | CLI11_PARSE(app, argc, argv); |
| 31 | } |
nothing calls this directly
no test coverage detected