LCOV - code coverage report
Current view: top level - apps - gdalalg_vector_info.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 6 6 100.0 %
Date: 2025-06-19 12:30:01 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "vector info" 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             : #ifndef GDALALG_VECTOR_INFO_INCLUDED
      14             : #define GDALALG_VECTOR_INFO_INCLUDED
      15             : 
      16             : #include "gdalalgorithm.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*                       GDALVectorInfoAlgorithm                        */
      22             : /************************************************************************/
      23             : 
      24             : class GDALVectorInfoAlgorithm final : public GDALAlgorithm
      25             : {
      26             :   public:
      27             :     static constexpr const char *NAME = "info";
      28             :     static constexpr const char *DESCRIPTION =
      29             :         "Return information on a vector dataset.";
      30             :     static constexpr const char *HELP_URL = "/programs/gdal_vector_info.html";
      31             : 
      32             :     GDALVectorInfoAlgorithm();
      33             : 
      34           6 :     void SetDataset(GDALDataset *poDS)
      35             :     {
      36           6 :         auto arg = GetArg(GDAL_ARG_NAME_INPUT);
      37           6 :         if (arg)
      38             :         {
      39           6 :             arg->Set(poDS);
      40           6 :             arg->SetSkipIfAlreadySet();
      41             :         }
      42           6 :     }
      43             : 
      44             :   private:
      45             :     bool RunImpl(GDALProgressFunc pfnProgress, void *pProgressData) override;
      46             : 
      47             :     std::string m_format{};
      48             :     GDALArgDatasetValue m_dataset{};
      49             :     std::vector<std::string> m_openOptions{};
      50             :     std::vector<std::string> m_inputFormats{};
      51             :     bool m_update = false;
      52             :     std::vector<std::string> m_layerNames{};
      53             :     bool m_listFeatures = false;
      54             :     bool m_summaryOnly = false;
      55             :     bool m_stdout = false;
      56             :     std::string m_sql{};
      57             :     std::string m_where{};
      58             :     std::string m_dialect{};
      59             :     std::string m_output{};
      60             : };
      61             : 
      62             : //! @endcond
      63             : 
      64             : #endif

Generated by: LCOV version 1.14