LCOV - code coverage report
Current view: top level - frmts/pcidsk/sdk/segment - cpcidskbinarysegment.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 0 4 0.0 %
Date: 2024-11-21 22:18:42 Functions: 0 2 0.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Purpose: Support for reading and manipulating general PCIDSK Binary Segments
       4             :  *
       5             :  ******************************************************************************
       6             :  * Copyright (c) 2010
       7             :  * PCI Geomatics, 90 Allstate Parkway, Markham, Ontario, Canada.
       8             :  *
       9             :  * SPDX-License-Identifier: MIT
      10             :  ****************************************************************************/
      11             : #ifndef INCLUDE_PCIDSK_SEGMENT_PCIDSKBINARY_SEG_H
      12             : #define INCLUDE_PCIDSK_SEGMENT_PCIDSKBINARY_SEG_H
      13             : 
      14             : #include "pcidsk_binary.h"
      15             : #include "segment/cpcidsksegment.h"
      16             : 
      17             : namespace PCIDSK {
      18             :     class PCIDSKFile;
      19             : 
      20             :     class CPCIDSKBinarySegment : public PCIDSKBinarySegment,
      21             :         public CPCIDSKSegment
      22             :     {
      23             :     public:
      24             :         CPCIDSKBinarySegment(PCIDSKFile *file, int segment,
      25             :             const char *segment_pointer, bool bLoad=true);
      26             :         ~CPCIDSKBinarySegment();
      27             : 
      28           0 :         const char* GetBuffer(void) const override
      29             :         {
      30           0 :             return seg_data.buffer;
      31             :         }
      32             : 
      33           0 :         unsigned int GetBufferSize(void) const override
      34             :         {
      35           0 :             return seg_data.buffer_size;
      36             :         }
      37             :         void SetBuffer(const char* pabyBuf,
      38             :             unsigned int nBufSize) override;
      39             : 
      40             :         //synchronize the segment on disk.
      41             :         void Synchronize() override;
      42             :     private:
      43             : 
      44             :         // Helper housekeeping functions
      45             :         void Load();
      46             :         void Write();
      47             : 
      48             :     //functions to read/write binary information
      49             :     protected:
      50             :         // The raw segment data
      51             :         PCIDSKBuffer seg_data;
      52             :         bool loaded_;
      53             :         bool mbModified;
      54             :     };
      55             : }
      56             : 
      57             : #endif // INCLUDE_PCIDSK_SEGMENT_PCIDSKBINARY_SEG_H

Generated by: LCOV version 1.14