LCOV - code coverage report
Current view: directory - frmts/pcraster - pcrastermisc.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 14 13 92.9 %
Date: 2012-04-28 Functions: 4 3 75.0 %

       1                 : /******************************************************************************
       2                 :  * $Id: pcrastermisc.cpp 13149 2007-11-29 15:08:00Z warmerdam $
       3                 :  *
       4                 :  * Project:  PCRaster Integration
       5                 :  * Purpose:  PCRaster driver support functions.
       6                 :  * Author:   Kor de Jong, k.dejong at geog.uu.nl
       7                 :  *
       8                 :  ******************************************************************************
       9                 :  * Copyright (c) 2004, Kor de Jong
      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                 : // Library headers.
      31                 : #ifndef INCLUDED_IOSTREAM
      32                 : #include <iostream>
      33                 : #define INCLUDED_IOSTREAM
      34                 : #endif
      35                 : 
      36                 : #ifndef INCLUDED_STRING
      37                 : #include <string>
      38                 : #define INCLUDED_STRING
      39                 : #endif
      40                 : 
      41                 : // PCRaster library headers.
      42                 : 
      43                 : // Module headers.
      44                 : #include "gdal_pam.h"
      45                 : 
      46                 : #ifndef INCLUDED_PCRASTERDATASET
      47                 : #include "pcrasterdataset.h"
      48                 : #define INCLUDED_PCRASTERDATASET
      49                 : #endif
      50                 : 
      51                 : 
      52                 : 
      53                 : CPL_C_START
      54                 : void GDALRegister_PCRaster(void);
      55                 : CPL_C_END
      56                 : 
      57                 : 
      58                 : 
      59            1135 : void GDALRegister_PCRaster()
      60                 : {
      61            1135 :     if (! GDAL_CHECK_VERSION("PCRaster driver"))
      62               0 :         return;
      63                 : 
      64            1135 : if(!GDALGetDriverByName("PCRaster")) {
      65                 : 
      66            1093 :     GDALDriver* driver = new GDALDriver();
      67                 : 
      68            1093 :     driver->SetDescription("PCRaster");
      69            1093 :     driver->SetMetadataItem(GDAL_DMD_LONGNAME, "PCRaster Raster File");
      70            1093 :     driver->SetMetadataItem(GDAL_DMD_CREATIONDATATYPES, "Byte Int32 Float32");
      71            1093 :     driver->SetMetadataItem(GDAL_DMD_HELPTOPIC, "frmt_various.html#PCRaster");
      72            1093 :     driver->SetMetadataItem( GDAL_DMD_EXTENSION, "map" );
      73                 : 
      74            1093 :     driver->pfnOpen = PCRasterDataset::open;
      75            1093 :     driver->pfnCreateCopy = PCRasterDataset::createCopy;
      76                 : 
      77            1093 :     GetGDALDriverManager()->RegisterDriver(driver);
      78                 : }
      79            4029 : }

Generated by: LCOV version 1.7