LTP GCOV extension - code coverage report
Current view: directory - ogr/ogrsf_frmts/pcidsk - ogr_pcidsk.h
Test: gdal_filtered.info
Date: 2010-07-12 Instrumented lines: 4
Code covered: 25.0 % Executed lines: 1

       1                 : /******************************************************************************
       2                 :  * $Id: ogr_csv.h 17495 2009-08-02 11:44:13Z rouault $
       3                 :  *
       4                 :  * Project:  PCIDSK Translator
       5                 :  * Purpose:  Definition of classes for PCIDSK vector segment driver.
       6                 :  * Author:   Frank Warmerdam, warmerdam@pobox.com
       7                 :  *
       8                 :  ******************************************************************************
       9                 :  * Copyright (c) 2009,  Frank Warmerdam
      10                 :  *
      11                 :  * Permission is hereby granted, free of charge, to any person obtaining a
      12                 :  * copy of this software and associated documentation files (the "Software"),
      13                 :  * to deal in the Software without restriction, including without limitation
      14                 :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      15                 :  * and/or sell copies of the Software, and to permit persons to whom the
      16                 :  * Software is furnished to do so, subject to the following conditions:
      17                 :  *
      18                 :  * The above copyright notice and this permission notice shall be included
      19                 :  * in all copies or substantial portions of the Software.
      20                 :  *
      21                 :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
      22                 :  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      23                 :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      24                 :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      25                 :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      26                 :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      27                 :  * DEALINGS IN THE SOFTWARE.
      28                 :  ****************************************************************************/
      29                 : 
      30                 : #ifndef _OGR_PCIDSK_H_INCLUDED
      31                 : #define _OGR_PCIDSK_H_INCLUDED
      32                 : 
      33                 : #include "ogrsf_frmts.h"
      34                 : #include "pcidsk.h"
      35                 : #include "pcidsk_vectorsegment.h"
      36                 : 
      37                 : class OGRPCIDSKDataSource;
      38                 : 
      39                 : /************************************************************************/
      40                 : /*                             OGRPCIDSKLayer                              */
      41                 : /************************************************************************/
      42                 : 
      43                 : class OGRPCIDSKLayer : public OGRLayer
      44                 : {
      45                 :     PCIDSK::PCIDSKVectorSegment *poVecSeg;
      46                 :     PCIDSK::PCIDSKSegment       *poSeg;
      47                 : 
      48                 :     OGRFeatureDefn     *poFeatureDefn;
      49                 : 
      50                 :     OGRFeature *        GetNextUnfilteredFeature();
      51                 : 
      52                 :     int                 iRingStartField;
      53                 :     PCIDSK::ShapeId     hLastShapeId;
      54                 : 
      55                 :   public:
      56                 :     OGRPCIDSKLayer( PCIDSK::PCIDSKSegment* );
      57                 :     ~OGRPCIDSKLayer();
      58                 : 
      59                 :     void                ResetReading();
      60                 :     OGRFeature *        GetNextFeature();
      61                 : 
      62               0 :     OGRFeatureDefn *    GetLayerDefn() { return poFeatureDefn; }
      63                 : 
      64                 :     int                 TestCapability( const char * );
      65                 : };
      66                 : 
      67                 : /************************************************************************/
      68                 : /*                           OGRPCIDSKDataSource                           */
      69                 : /************************************************************************/
      70                 : 
      71                 : class OGRPCIDSKDataSource : public OGRDataSource
      72                 : {
      73                 :     CPLString           osName;
      74                 : 
      75                 :     std::vector<OGRPCIDSKLayer*> apoLayers;
      76                 : 
      77                 :     int                 bUpdate;
      78                 : 
      79                 :     PCIDSK::PCIDSKFile  *poFile;
      80                 :     
      81                 :   public:
      82                 :                         OGRPCIDSKDataSource();
      83                 :                         ~OGRPCIDSKDataSource();
      84                 : 
      85                 :     int                 Open( const char * pszFilename, int bUpdate);
      86                 :     
      87               0 :     const char          *GetName() { return osName; }
      88                 : 
      89               0 :     int                 GetLayerCount() { return (int) apoLayers.size(); }
      90                 :     OGRLayer            *GetLayer( int );
      91                 : 
      92                 :     int                 TestCapability( const char * );
      93                 : };
      94                 : 
      95                 : /************************************************************************/
      96                 : /*                           OGRPCIDSKDriver                            */
      97                 : /************************************************************************/
      98                 : 
      99                 : class OGRPCIDSKDriver : public OGRSFDriver
     100              80 : {
     101                 :   public:
     102                 :                 ~OGRPCIDSKDriver();
     103                 :                 
     104                 :     const char *GetName();
     105                 :     OGRDataSource *Open( const char *, int );
     106                 :     int         TestCapability( const char * );
     107                 : };
     108                 : 
     109                 : 
     110                 : #endif /* ndef _OGR_PCIDSK_H_INCLUDED */

Generated by: LTP GCOV extension version 1.5