LCOV - code coverage report
Current view: top level - frmts/kea - keadriver.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 10 12 83.3 %
Date: 2024-04-27 14:28:19 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*
       2             :  *  keadriver.cpp
       3             :  *
       4             :  *  Created by Pete Bunting on 01/08/2012.
       5             :  *  Copyright 2012 LibKEA. All rights reserved.
       6             :  *
       7             :  *  This file is part of LibKEA.
       8             :  *
       9             :  *  Permission is hereby granted, free of charge, to any person
      10             :  *  obtaining a copy of this software and associated documentation
      11             :  *  files (the "Software"), to deal in the Software without restriction,
      12             :  *  including without limitation the rights to use, copy, modify,
      13             :  *  merge, publish, distribute, sublicense, and/or sell copies of the
      14             :  *  Software, and to permit persons to whom the Software is furnished
      15             :  *  to do so, subject to the following conditions:
      16             :  *
      17             :  *  The above copyright notice and this permission notice shall be
      18             :  *  included in all copies or substantial portions of the Software.
      19             :  *
      20             :  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
      21             :  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
      22             :  *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
      23             :  *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
      24             :  *  ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
      25             :  *  CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
      26             :  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
      27             :  *
      28             :  */
      29             : 
      30             : #include "gdal_frmts.h"
      31             : #include "keadataset.h"
      32             : #include "keadrivercore.h"
      33             : 
      34             : // method to register this driver
      35           7 : void GDALRegister_KEA()
      36             : {
      37           7 :     if (!GDAL_CHECK_VERSION("KEA"))
      38           0 :         return;
      39             : 
      40           7 :     if (GDALGetDriverByName(DRIVER_NAME) != nullptr)
      41           0 :         return;
      42             : 
      43           7 :     GDALDriver *poDriver = new GDALDriver();
      44           7 :     KEADriverSetCommonMetadata(poDriver);
      45             : 
      46           7 :     poDriver->pfnOpen = KEADataset::Open;
      47           7 :     poDriver->pfnCreate = KEADataset::Create;
      48           7 :     poDriver->pfnCreateCopy = KEADataset::CreateCopy;
      49           7 :     poDriver->pfnUnloadDriver = KEADatasetDriverUnload;
      50             : 
      51           7 :     GetGDALDriverManager()->RegisterDriver(poDriver);
      52             : }

Generated by: LCOV version 1.14