LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/gml - gmlreader.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 0 6 0.0 %
Date: 2024-11-21 22:18:42 Functions: 0 3 0.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  * $Id$
       3             :  *
       4             :  * Project:  GML Reader
       5             :  * Purpose:  Public Declarations for OGR free GML Reader code.
       6             :  * Author:   Frank Warmerdam, warmerdam@pobox.com
       7             :  *
       8             :  ******************************************************************************
       9             :  * Copyright (c) 2002, Frank Warmerdam
      10             :  * Copyright (c) 2008-2013, Even Rouault <even dot rouault at spatialys.com>
      11             :  *
      12             :  * SPDX-License-Identifier: MIT
      13             :  ****************************************************************************/
      14             : 
      15             : #ifndef GMLREADER_H_INCLUDED
      16             : #define GMLREADER_H_INCLUDED
      17             : 
      18             : #include "cpl_port.h"
      19             : #include "cpl_vsi.h"
      20             : #include "cpl_minixml.h"
      21             : #include "ogr_core.h"
      22             : #include "gmlutils.h"
      23             : #include "gmlfeature.h"
      24             : 
      25             : #include <map>
      26             : #include <vector>
      27             : 
      28             : // Special value to map to a NULL field
      29             : #define OGR_GML_NULL "___OGR_GML_NULL___"
      30             : 
      31             : /************************************************************************/
      32             : /*                              IGMLReader                              */
      33             : /************************************************************************/
      34             : class CPL_DLL IGMLReader
      35             : {
      36             :   public:
      37             :     virtual ~IGMLReader();
      38             : 
      39             :     virtual bool IsClassListLocked() const = 0;
      40             :     virtual void SetClassListLocked(bool bFlag) = 0;
      41             : 
      42             :     virtual void SetSourceFile(const char *pszFilename) = 0;
      43             : 
      44           0 :     virtual void SetFP(CPL_UNUSED VSILFILE *fp)
      45             :     {
      46           0 :     }
      47             : 
      48             :     virtual const char *GetSourceFileName() = 0;
      49             : 
      50             :     virtual int GetClassCount() const = 0;
      51             :     virtual GMLFeatureClass *GetClass(int i) const = 0;
      52             :     virtual GMLFeatureClass *GetClass(const char *pszName) const = 0;
      53             : 
      54             :     virtual int AddClass(GMLFeatureClass *poClass) = 0;
      55             :     virtual void ClearClasses() = 0;
      56             : 
      57             :     virtual GMLFeature *NextFeature() = 0;
      58             :     virtual void ResetReading() = 0;
      59             : 
      60             :     virtual bool LoadClasses(const char *pszFile = nullptr) = 0;
      61             :     virtual bool SaveClasses(const char *pszFile = nullptr) = 0;
      62             : 
      63             :     virtual bool ResolveXlinks(const char *pszFile, bool *pbOutIsTempFile,
      64             :                                char **papszSkip = nullptr,
      65             :                                const bool bStrict = false) = 0;
      66             : 
      67             :     virtual bool HugeFileResolver(const char *pszFile, bool bSqliteIsTempFile,
      68             :                                   int iSqliteCacheMB) = 0;
      69             : 
      70             :     virtual bool PrescanForSchema(bool bGetExtents = true,
      71             :                                   bool bOnlyDetectSRS = false) = 0;
      72             :     virtual bool PrescanForTemplate() = 0;
      73             : 
      74             :     virtual bool HasStoppedParsing() = 0;
      75             : 
      76           0 :     virtual void SetGlobalSRSName(CPL_UNUSED const char *pszGlobalSRSName)
      77             :     {
      78           0 :     }
      79             : 
      80             :     virtual const char *GetGlobalSRSName() = 0;
      81             :     virtual bool CanUseGlobalSRSName() = 0;
      82             : 
      83             :     virtual bool SetFilteredClassName(const char *pszClassName) = 0;
      84             :     virtual const char *GetFilteredClassName() = 0;
      85             : 
      86           0 :     virtual bool IsSequentialLayers() const
      87             :     {
      88           0 :         return false;
      89             :     }
      90             : };
      91             : 
      92             : IGMLReader *CreateGMLReader(bool bUseExpatParserPreferably,
      93             :                             bool bInvertAxisOrderIfLatLong,
      94             :                             bool bConsiderEPSGAsURN,
      95             :                             GMLSwapCoordinatesEnum eSwapCoordinates,
      96             :                             bool bGetSecondaryGeometryOption);
      97             : 
      98             : #endif /* GMLREADER_H_INCLUDED */

Generated by: LCOV version 1.14