LCOV - code coverage report
Current view: top level - apps - gdalalg_main.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 0 2 0.0 %
Date: 2025-01-18 12:42:00 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "main" command
       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             : #ifndef GDALALG_MAIN_INCLUDED
      14             : #define GDALALG_MAIN_INCLUDED
      15             : 
      16             : #include "gdalalgorithm.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*                         GDALMainAlgorithm                            */
      22             : /************************************************************************/
      23             : 
      24             : class GDALMainAlgorithm final : public GDALAlgorithm
      25             : {
      26             :   public:
      27             :     static constexpr const char *NAME =
      28             :         GDALGlobalAlgorithmRegistry::ROOT_ALG_NAME;
      29             :     static constexpr const char *DESCRIPTION = "Main gdal entry point.";
      30             :     static constexpr const char *HELP_URL = "/programs/index.html";
      31             : 
      32             :     static std::vector<std::string> GetAliases()
      33             :     {
      34             :         return {};
      35             :     }
      36             : 
      37             :     GDALMainAlgorithm();
      38             : 
      39             :     bool
      40             :     ParseCommandLineArguments(const std::vector<std::string> &args) override;
      41             : 
      42             :     std::string GetUsageForCLI(bool shortUsage,
      43             :                                const UsageOptions &usageOptions) const override;
      44             : 
      45             :   private:
      46             :     std::unique_ptr<GDALAlgorithm> m_subAlg{};
      47             :     bool m_showUsage = true;
      48             : 
      49           0 :     bool RunImpl(GDALProgressFunc, void *) override
      50             :     {
      51           0 :         return true;
      52             :     }
      53             : };
      54             : 
      55             : //! @endcond
      56             : 
      57             : #endif  // GDALALG_MAIN_INCLUDED

Generated by: LCOV version 1.14