Coverage Report

Created: 2026-07-25 06:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/apps/gdalalg_mdim_info.h
Line
Count
Source
1
/******************************************************************************
2
 *
3
 * Project:  GDAL
4
 * Purpose:  gdal "mdim info" subcommand
5
 * Author:   Even Rouault <even dot rouault at spatialys.com>
6
 *
7
 ******************************************************************************
8
 * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
9
 *
10
 * SPDX-License-Identifier: MIT
11
 ****************************************************************************/
12
13
#ifndef GDALALG_MDIM_INFO_INCLUDED
14
#define GDALALG_MDIM_INFO_INCLUDED
15
16
#include "gdalalg_mdim_pipeline.h"
17
18
//! @cond Doxygen_Suppress
19
20
/************************************************************************/
21
/*                        GDALMdimInfoAlgorithm                         */
22
/************************************************************************/
23
24
class GDALMdimInfoAlgorithm /* non final */
25
    : public GDALMdimPipelineStepAlgorithm
26
{
27
  public:
28
    static constexpr const char *NAME = "info";
29
    static constexpr const char *DESCRIPTION =
30
        "Return information on a multidimensional dataset.";
31
    static constexpr const char *HELP_URL = "/programs/gdal_mdim_info.html";
32
33
    explicit GDALMdimInfoAlgorithm(bool standaloneStep = false,
34
                                   bool openForMixedRasterVector = false);
35
36
    bool CanBeLastStep() const override
37
0
    {
38
0
        return true;
39
0
    }
40
41
  private:
42
    bool RunStep(GDALPipelineStepRunContext &ctxt) override;
43
44
    bool m_summary = false;
45
    bool m_detailed = false;
46
    std::string m_array{};
47
    int m_limit = 0;
48
    std::vector<std::string> m_arrayOptions{};
49
    bool m_stats = false;
50
};
51
52
/************************************************************************/
53
/*                   GDALMdimInfoAlgorithmStandalone                    */
54
/************************************************************************/
55
56
class GDALMdimInfoAlgorithmStandalone final : public GDALMdimInfoAlgorithm
57
{
58
  public:
59
    GDALMdimInfoAlgorithmStandalone()
60
0
        : GDALMdimInfoAlgorithm(/* standaloneStep = */ true)
61
0
    {
62
0
    }
63
64
    ~GDALMdimInfoAlgorithmStandalone() override;
65
};
66
67
//! @endcond
68
69
#endif