GDAL

gdalsubdatasetinfo.h
1/***************************************************************************
2 gdal_subdatasetinfo.h - GDALSubdatasetInfo
3
4 ---------------------
5 begin : 21.7.2023
6 copyright : (C) 2023 by Alessndro Pasotti
7 email : elpaso@itopen.it
8 ***************************************************************************
9 * *
10 * SPDX-License-Identifier: MIT
11 * *
12 ***************************************************************************/
13#ifndef GDALSUBDATASETINFO_H
14#define GDALSUBDATASETINFO_H
15
16#include "cpl_port.h"
17#include <string>
18
26 struct CPL_DLL GDALSubdatasetInfo
27{
28
29 public:
34 GDALSubdatasetInfo(const std::string &fileName);
35
36 virtual ~GDALSubdatasetInfo() = default;
37
44 std::string GetPathComponent() const;
45
55 std::string ModifyPathComponent(const std::string &newPathName) const;
56
63 std::string GetSubdatasetComponent() const;
64
66 protected:
71 virtual void parseFileName() = 0;
72
76 static std::string quote(const std::string &path);
77
81 static std::string unquote(const std::string &path);
82
84 std::string m_fileName;
86 std::string m_pathComponent;
88 std::string m_cleanedPathComponent;
90 std::string m_subdatasetComponent;
92 std::string m_driverPrefixComponent;
94 bool m_isQuoted = false;
95
96 private:
97 mutable bool m_initialized = false;
98
99 void init() const;
100
102};
103
104#endif // GDALSUBDATASETINFO_H
cpl_port.h
Core portability definitions for CPL.
GDALSubdatasetInfo
The GDALSubdatasetInfo abstract class provides methods to extract and manipulate subdataset informati...
Definition gdalsubdatasetinfo.h:27