LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/mitab - mitab_ogr_driver.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 2 4 50.0 %
Date: 2024-05-05 20:23:34 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /**********************************************************************
       2             :  * $Id$
       3             :  *
       4             :  * Name:     mitab_ogr_drive.h
       5             :  * Project:  Mid/mif tab ogr support
       6             :  * Language: C++
       7             :  * Purpose:  Header file containing public definitions for the library.
       8             :  * Author:   Stephane Villeneuve, stephane.v@videotron.ca
       9             :  *
      10             :  **********************************************************************
      11             :  * Copyright (c) 1999, 2000, Stephane Villeneuve
      12             :  * Copyright (c) 2014, Even Rouault <even.rouault at spatialys.com>
      13             :  *
      14             :  * Permission is hereby granted, free of charge, to any person obtaining a
      15             :  * copy of this software and associated documentation files (the "Software"),
      16             :  * to deal in the Software without restriction, including without limitation
      17             :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      18             :  * and/or sell copies of the Software, and to permit persons to whom the
      19             :  * Software is furnished to do so, subject to the following conditions:
      20             :  *
      21             :  * The above copyright notice and this permission notice shall be included
      22             :  * in all copies or substantial portions of the Software.
      23             :  *
      24             :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      25             :  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      26             :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
      27             :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      28             :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      29             :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      30             :  * DEALINGS IN THE SOFTWARE.
      31             :  **********************************************************************/
      32             : 
      33             : #include "mitab.h"
      34             : #include "ogrsf_frmts.h"
      35             : 
      36             : #ifndef MITAB_OGR_DRIVER_H_INCLUDED_
      37             : #define MITAB_OGR_DRIVER_H_INCLUDED_
      38             : 
      39             : /*=====================================================================
      40             :  *            OGRTABDataSource Class
      41             :  *
      42             :  * These classes handle all the file types supported by the MITAB lib.
      43             :  * through the IMapInfoFile interface.
      44             :  *====================================================================*/
      45             : class OGRTABDataSource : public OGRDataSource
      46             : {
      47             :     CPL_DISALLOW_COPY_ASSIGN(OGRTABDataSource)
      48             : 
      49             :   private:
      50             :     char *m_pszName;
      51             :     char *m_pszDirectory;
      52             : 
      53             :     int m_nLayerCount;
      54             :     IMapInfoFile **m_papoLayers;
      55             : 
      56             :     char **m_papszOptions;
      57             :     int m_bCreateMIF;
      58             :     int m_bSingleFile;
      59             :     int m_bSingleLayerAlreadyCreated;
      60             :     GBool m_bQuickSpatialIndexMode;
      61             :     int m_nBlockSize;
      62             : 
      63             :   private:
      64        2406 :     inline bool GetUpdate() const
      65             :     {
      66        2406 :         return eAccess == GA_Update;
      67             :     }
      68             : 
      69             :   public:
      70             :     OGRTABDataSource();
      71             :     virtual ~OGRTABDataSource();
      72             : 
      73             :     int Open(GDALOpenInfo *poOpenInfo, int bTestOpen);
      74             :     int Create(const char *pszName, char **papszOptions);
      75             : 
      76           0 :     const char *GetName() override
      77             :     {
      78           0 :         return m_pszName;
      79             :     }
      80             : 
      81             :     int GetLayerCount() override;
      82             :     OGRLayer *GetLayer(int) override;
      83             :     int TestCapability(const char *) override;
      84             : 
      85             :     OGRLayer *ICreateLayer(const char *pszName,
      86             :                            const OGRGeomFieldDefn *poGeomFieldDefn,
      87             :                            CSLConstList papszOptions) override;
      88             : 
      89             :     char **GetFileList() override;
      90             : 
      91             :     virtual OGRLayer *ExecuteSQL(const char *pszStatement,
      92             :                                  OGRGeometry *poSpatialFilter,
      93             :                                  const char *pszDialect) override;
      94             : };
      95             : 
      96             : void CPL_DLL RegisterOGRTAB();
      97             : 
      98             : #endif /* MITAB_OGR_DRIVER_H_INCLUDED_ */

Generated by: LCOV version 1.14