LCOV - code coverage report
Current view: top level - frmts/ecw - ecwsdk_headers.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 2 2 100.0 %
Date: 2024-05-04 12:52:34 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  Includes ECW SDK headers
       5             :  * Author:   Even Rouault <even dot rouault at spatialys dot com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2015, Even Rouault <even dot rouault at spatialys dot com>
       9             :  *
      10             :  * Permission is hereby granted, free of charge, to any person obtaining a
      11             :  * copy of this software and associated documentation files (the "Software"),
      12             :  * to deal in the Software without restriction, including without limitation
      13             :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      14             :  * and/or sell copies of the Software, and to permit persons to whom the
      15             :  * Software is furnished to do so, subject to the following conditions:
      16             :  *
      17             :  * The above copyright notice and this permission notice shall be included
      18             :  * in all copies or substantial portions of the Software.
      19             :  *
      20             :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
      21             :  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      22             :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      23             :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      24             :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      25             :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      26             :  * DEALINGS IN THE SOFTWARE.
      27             :  *****************************************************************************/
      28             : 
      29             : #ifndef ECWSDK_HEADERS_H
      30             : #define ECWSDK_HEADERS_H
      31             : 
      32             : #include "cpl_port.h"
      33             : 
      34             : #ifdef HAVE_GCC_SYSTEM_HEADER
      35             : #pragma GCC system_header
      36             : #endif
      37             : 
      38             : // The following is needed on 4.x+ to enable rw support.
      39             : #if defined(HAVE_COMPRESS)
      40             : #ifndef ECW_COMPRESS_RW_SDK_VERSION
      41             : #define ECW_COMPRESS_RW_SDK_VERSION
      42             : #endif
      43             : #endif
      44             : 
      45             : #if defined(_MSC_VER)
      46             : #pragma warning(disable : 4800)
      47             : #endif
      48             : 
      49             : #include <NCSECWClient.h>
      50             : #include <NCSECWCompressClient.h>
      51             : #include <NCSErrors.h>
      52             : #include <NCSFile.h>
      53             : #include <NCSJP2FileView.h>
      54             : 
      55             : #ifdef HAVE_ECW_BUILDNUMBER_H
      56             : #include <ECWJP2BuildNumber.h>
      57             : #if !defined(ECW_VERSION)
      58             : #define ECWSDK_VERSION (NCS_ECWJP2_VER_MAJOR * 10 + NCS_ECWJP2_VER_MINOR)
      59             : #endif
      60             : #else
      61             : /* By default, assume 3.3 SDK Version. */
      62             : #if !defined(ECWSDK_VERSION)
      63             : #define ECWSDK_VERSION 33
      64             : #endif
      65             : #endif
      66             : 
      67             : #if ECWSDK_VERSION < 40
      68             : 
      69             : #include <NCSJPCFileIOStream.h>
      70             : #if !defined(NO_COMPRESS) && !defined(HAVE_COMPRESS)
      71             : #define HAVE_COMPRESS
      72             : #endif
      73             : 
      74             : #else
      75             : #if ECWSDK_VERSION >= 50
      76             : #if ECWSDK_VERSION >= 51
      77             : #define JPEG2000_DOMAIN_NAME "JPEG2000"
      78             : #endif
      79             : #include <NCSECWHeaderEditor.h>
      80             : #include "NCSEcw/SDK/Box.h"
      81             : #else
      82             : #include <HeaderEditor.h>
      83             : #endif
      84             : #define NCS_FASTCALL
      85             : #endif
      86             : 
      87             : #if ECWSDK_VERSION >= 40
      88             : #define SDK_CAN_DO_SUPERSAMPLING 1
      89             : #endif
      90             : 
      91             : #ifndef NCSFILEBASE_H
      92             : #include <NCSJP2FileView.h>
      93             : #else
      94             : #undef CNCSJP2FileView
      95             : #define CNCSJP2FileView CNCSFile
      96             : #endif
      97             : 
      98             : /* Trick to avoid warnings with SDK 3.3 when assigning a NCSError code */
      99             : /* to a CNCSError object */
     100        4333 : static inline CNCSError GetCNCSError(NCSError nCode)
     101             : {
     102        4333 :     return CNCSError(nCode);
     103             : }
     104             : 
     105             : #if ECWSDK_VERSION < 50
     106             : /* For NCSStrDup */
     107             : #include "NCSUtil.h"
     108             : #endif
     109             : 
     110             : #endif

Generated by: LCOV version 1.14