LCOV - code coverage report
Current view: top level - frmts/pds - vicarkeywordhandler.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 2 2 100.0 %
Date: 2024-11-21 22:18:42 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  VICAR Driver; JPL/MIPL VICAR Format
       4             :  * Purpose:  Implementation of VICARKeywordHandler - a class to read
       5             :  *           keyword data from VICAR data products.
       6             :  * Authors:  Sebastian Walter <sebastian dot walter at fu-berlin dot de>
       7             :  *
       8             :  * NOTE: This driver code is loosely based on the ISIS and PDS drivers.
       9             :  * It is not intended to diminish the contribution of the authors.
      10             :  ******************************************************************************
      11             :  * Copyright (c) 2014, Sebastian Walter <sebastian dot walter at fu-berlin dot
      12             :  *de>
      13             :  *
      14             :  * SPDX-License-Identifier: MIT
      15             :  ****************************************************************************/
      16             : 
      17             : #ifndef VICARKEYWORDHANDLER_H
      18             : #define VICARKEYWORDHANDLER_H
      19             : 
      20             : #include "cpl_json.h"
      21             : 
      22             : class VICARKeywordHandler
      23             : {
      24             :     char **papszKeywordList;
      25             : 
      26             :     CPLString osHeaderText;
      27             :     const char *pszHeaderNext;
      28             : 
      29             :     CPLJSONObject oJSon;
      30             : 
      31             :     void SkipWhite();
      32             :     bool ReadName(CPLString &osWord);
      33             :     bool ReadValue(CPLString &osWord, bool bInList, bool &bIsString);
      34             :     bool ReadPair(CPLString &osName, CPLString &osValue, CPLJSONObject &oCur);
      35             :     bool Parse();
      36             : 
      37             :   public:
      38             :     VICARKeywordHandler();
      39             :     ~VICARKeywordHandler();
      40             : 
      41             :     bool Ingest(VSILFILE *fp, const GByte *pabyHeader);
      42             : 
      43             :     const char *GetKeyword(const char *pszPath, const char *pszDefault) const;
      44             : 
      45         113 :     const CPLJSONObject &GetJsonObject() const
      46             :     {
      47         113 :         return oJSon;
      48             :     }
      49             : };
      50             : 
      51             : #endif  // VICARKEYWORDHANDLER_H

Generated by: LCOV version 1.14