LTP GCOV extension - code coverage report
Current view: directory - ogr/ogrsf_frmts/mitab - mitab_ogr_driver.h
Test: gdal_filtered.info
Date: 2010-07-12 Instrumented lines: 2
Code covered: 100.0 % Executed lines: 2

       1                 : /**********************************************************************
       2                 :  * $Id: mitab_ogr_driver.h,v 1.14 2007/03/22 20:01:36 dmorissette Exp $
       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                 :  *
      13                 :  * Permission is hereby granted, free of charge, to any person obtaining a
      14                 :  * copy of this software and associated documentation files (the "Software"),
      15                 :  * to deal in the Software without restriction, including without limitation
      16                 :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      17                 :  * and/or sell copies of the Software, and to permit persons to whom the
      18                 :  * Software is furnished to do so, subject to the following conditions:
      19                 :  * 
      20                 :  * The above copyright notice and this permission notice shall be included
      21                 :  * in all copies or substantial portions of the Software.
      22                 :  * 
      23                 :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      24                 :  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      25                 :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
      26                 :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      27                 :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      28                 :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
      29                 :  * DEALINGS IN THE SOFTWARE.
      30                 :  **********************************************************************
      31                 :  *
      32                 :  * $Log: mitab_ogr_driver.h,v $
      33                 :  * Revision 1.14  2007/03/22 20:01:36  dmorissette
      34                 :  * Added SPATIAL_INDEX_MODE=QUICK creation option (MITAB bug 1669)
      35                 :  *
      36                 :  * Revision 1.13  2004/07/07 16:11:39  fwarmerdam
      37                 :  * fixed up some single layer creation issues
      38                 :  *
      39                 :  * Revision 1.12  2004/02/27 21:06:03  fwarmerdam
      40                 :  * Better support for "single file" creation ... don't allow other layers to
      41                 :  * be created.  But *do* single file to satisfy the first layer creation request
      42                 :  * made.  Also, allow creating a datasource "on" an existing directory.
      43                 :  *
      44                 :  * Revision 1.11  2003/03/20 15:57:46  warmerda
      45                 :  * Added delete datasource support
      46                 :  *
      47                 :  * Revision 1.10  2002/02/08 16:52:16  warmerda
      48                 :  * added support for FORMAT=MIF option for creating layers
      49                 :  *
      50                 :  * Revision 1.9  2001/09/14 03:22:58  warmerda
      51                 :  * added RegisterOGRTAB() prototype
      52                 :  *
      53                 :  * Revision 1.8  2001/01/22 16:03:59  warmerda
      54                 :  * expanded tabs
      55                 :  *
      56                 :  * Revision 1.7  2000/01/26 18:17:00  warmerda
      57                 :  * reimplement OGR driver
      58                 :  *
      59                 :  * Revision 1.6  2000/01/15 22:30:44  daniel
      60                 :  * Switch to MIT/X-Consortium OpenSource license
      61                 :  *
      62                 :  * Revision 1.5  1999/12/15 16:28:17  warmerda
      63                 :  * fixed a few type problems
      64                 :  *
      65                 :  * Revision 1.4  1999/12/15 16:15:05  warmerda
      66                 :  * Avoid unused parameter warnings.
      67                 :  *
      68                 :  * Revision 1.3  1999/12/14 02:23:05  daniel
      69                 :  * Merged TAB+MIF DataSource/Driver into one using IMapInfoFile class
      70                 :  *
      71                 :  * Revision 1.2  1999/11/12 02:44:36  stephane
      72                 :  * added comment, change Register name.
      73                 :  *
      74                 :  * Revision 1.1  1999/11/08 21:05:51  svillene
      75                 :  * first revision
      76                 :  *
      77                 :  **********************************************************************/
      78                 : 
      79                 : #include "mitab.h"
      80                 : #include "ogrsf_frmts.h"
      81                 : 
      82                 : #ifndef _MITAB_OGR_DRIVER_H_INCLUDED_
      83                 : #define _MITAB_OGR_DRIVER_H_INCLUDED_
      84                 : 
      85                 : /*=====================================================================
      86                 :  *            OGRTABDataSource Class
      87                 :  * 
      88                 :  * These classes handle all the file types supported by the MITAB lib.
      89                 :  * through the IMapInfoFile interface.
      90                 :  *====================================================================*/
      91                 : class OGRTABDataSource : public OGRDataSource
      92                 : {
      93                 :   private:
      94                 :     char                *m_pszName;
      95                 :     char                *m_pszDirectory;
      96                 : 
      97                 :     int                 m_nLayerCount;
      98                 :     IMapInfoFile        **m_papoLayers;
      99                 : 
     100                 :     char                **m_papszOptions;
     101                 :     int                 m_bCreateMIF;
     102                 :     int                 m_bSingleFile;
     103                 :     int                 m_bSingleLayerAlreadyCreated;
     104                 :     GBool               m_bQuickSpatialIndexMode;
     105                 : 
     106                 :   public:
     107                 :                 OGRTABDataSource();
     108                 :     virtual     ~OGRTABDataSource();
     109                 : 
     110                 :     int         Open( const char *pszName, int bTestOpen );
     111                 :     int         Create( const char *pszName, char ** papszOptions );
     112                 : 
     113              22 :     const char  *GetName() { return m_pszName; }
     114                 :     int          GetLayerCount();
     115                 :     OGRLayer    *GetLayer( int );
     116                 :     int          TestCapability( const char * );
     117                 :     
     118                 :     OGRLayer    *CreateLayer(const char *, 
     119                 :                              OGRSpatialReference * = NULL,
     120                 :                              OGRwkbGeometryType = wkbUnknown,
     121                 :                              char ** = NULL );
     122                 : };
     123                 :  
     124                 : /************************************************************************/
     125                 : /*                             OGRTABDriver                             */
     126                 : /************************************************************************/
     127                 : 
     128                 : class OGRTABDriver : public OGRSFDriver
     129              80 : {
     130                 : public:
     131                 :     virtual     ~OGRTABDriver();
     132                 : 
     133                 :     const char  *GetName();
     134                 :     OGRDataSource *Open ( const char *,int );
     135                 :     int         TestCapability( const char * );
     136                 :     virtual OGRDataSource *CreateDataSource( const char *, char ** = NULL );
     137                 :     virtual OGRErr DeleteDataSource( const char * );
     138                 : };
     139                 : 
     140                 : void CPL_DLL RegisterOGRTAB();
     141                 : 
     142                 : #endif /* _MITAB_OGR_DRIVER_H_INCLUDED_ */

Generated by: LTP GCOV extension version 1.5