LCOV - code coverage report
Current view: top level - apps - gdalalg_mdim.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 6 9 66.7 %
Date: 2025-03-31 11:17:27 Functions: 2 3 66.7 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "mdim" subcommand
       5             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "gdalalgorithm.h"
      14             : 
      15             : #include "gdalalg_mdim_info.h"
      16             : #include "gdalalg_mdim_convert.h"
      17             : 
      18             : /************************************************************************/
      19             : /*                         GDALMdimAlgorithm                            */
      20             : /************************************************************************/
      21             : 
      22             : class GDALMdimAlgorithm final : public GDALAlgorithm
      23             : {
      24             :   public:
      25             :     static constexpr const char *NAME = "mdim";
      26             :     static constexpr const char *DESCRIPTION = "Multidimensional commands.";
      27             :     static constexpr const char *HELP_URL = "/programs/gdal_mdim.html";
      28             : 
      29        1424 :     static std::vector<std::string> GetAliases()
      30             :     {
      31        1424 :         return {};
      32             :     }
      33             : 
      34          22 :     GDALMdimAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
      35             :     {
      36          22 :         RegisterSubAlgorithm<GDALMdimInfoAlgorithm>();
      37          22 :         RegisterSubAlgorithm<GDALMdimConvertAlgorithm>();
      38          22 :     }
      39             : 
      40             :   private:
      41           0 :     bool RunImpl(GDALProgressFunc, void *) override
      42             :     {
      43           0 :         CPLError(CE_Failure, CPLE_AppDefined,
      44             :                  "The Run() method should not be called directly on the \"gdal "
      45             :                  "mdim\" program.");
      46           0 :         return false;
      47             :     }
      48             : };
      49             : 
      50             : GDAL_STATIC_REGISTER_ALG(GDALMdimAlgorithm);

Generated by: LCOV version 1.14