| 25 | /************************************************************************/ |
| 26 | |
| 27 | GDALMainAlgorithm::GDALMainAlgorithm() |
| 28 | : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL) |
| 29 | { |
| 30 | for (const std::string &subAlgName : |
| 31 | GDALGlobalAlgorithmRegistry::GetSingleton().GetNames()) |
| 32 | { |
| 33 | const auto pInfo = |
| 34 | GDALGlobalAlgorithmRegistry::GetSingleton().GetInfo(subAlgName); |
| 35 | if (pInfo) |
| 36 | RegisterSubAlgorithm(*pInfo); |
| 37 | } |
| 38 | |
| 39 | SetCallPath({NAME}); |
| 40 | |
| 41 | AddArg("version", 0, _("Display GDAL version and exit"), &m_version) |
| 42 | .SetHiddenForAPI(); |
| 43 | AddArg("drivers", 0, _("Display driver list as JSON document"), &m_drivers); |
| 44 | |
| 45 | AddOutputStringArg(&m_output); |
| 46 | |
| 47 | m_longDescription = "'gdal <FILENAME>' can also be used as a shortcut for " |
| 48 | "'gdal info <FILENAME>'.\n" |
| 49 | "And 'gdal read <FILENAME> ! ...' as a shortcut for " |
| 50 | "'gdal pipeline <FILENAME> ! ...'."; |
| 51 | |
| 52 | SetDisplayInJSONUsage(false); |
| 53 | } |
| 54 | |
| 55 | /************************************************************************/ |
| 56 | /* GDALMainAlgorithm::ParseCommandLineArguments() */ |
nothing calls this directly
no test coverage detected