LCOV - code coverage report
Current view: top level - source/ioutils/fits - fitsFile.cpp (source / functions) Coverage Total Hit
Test: mxlib Lines: 100.0 % 9 9
Test Date: 2026-08-30 22:23:37 Functions: 100.0 % 4 4

            Line data    Source code
       1              : /** \file fitsFile.cpp
       2              :  * \brief Definitions for a class to work with FITS files
       3              :  * \ingroup fits_processing_files
       4              :  * \author Jared R. Males (jaredmales@gmail.com)
       5              :  *
       6              :  */
       7              : 
       8              : //***********************************************************************//
       9              : // Copyright 2025 Jared R. Males (jaredmales@gmail.com)
      10              : //
      11              : // This file is part of mxlib.
      12              : //
      13              : // mxlib is free software: you can redistribute it and/or modify
      14              : // it under the terms of the GNU General Public License as published by
      15              : // the Free Software Foundation, either version 3 of the License, or
      16              : // (at your option) any later version.
      17              : //
      18              : // mxlib is distributed in the hope that it will be useful,
      19              : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      20              : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      21              : // GNU General Public License for more details.
      22              : //
      23              : // You should have received a copy of the GNU General Public License
      24              : // along with mxlib.  If not, see <http://www.gnu.org/licenses/>.
      25              : //***********************************************************************//
      26              : 
      27              : #include "ioutils/fits/fitsFile.hpp"
      28              : 
      29              : namespace mx
      30              : {
      31              : namespace fits
      32              : {
      33              : 
      34              : namespace fitsFileDetail
      35              : {
      36              : 
      37              : namespace
      38              : {
      39              : 
      40           66 : int openFile( fitsfile **fptr, const char *fileName, int mode, int *status )
      41              : {
      42           66 :     return fits_open_file( fptr, fileName, mode, status );
      43              : }
      44              : 
      45          132 : long *allocateLongs( size_t count )
      46              : {
      47          132 :     return new long[count];
      48              : }
      49              : 
      50              : } // namespace
      51              : 
      52         1039 : fitsFileCfitsioOps &fitsFileCfitsioOpsInstance()
      53              : {
      54              :     static fitsFileCfitsioOps
      55              :         operations{ openFile, ffgidm, ffgisz, ffclos, ffgsv, ffghsp, ffgkyn, ffinit, ffcrim, ffppx, allocateLongs };
      56         1039 :     return operations;
      57              : }
      58              : 
      59            4 : void resetFitsFileCfitsioOps()
      60              : {
      61            4 :     fitsFileCfitsioOpsInstance() = fitsFileCfitsioOps{ openFile,
      62              :                                                        ffgidm,
      63              :                                                        ffgisz,
      64              :                                                        ffclos,
      65              :                                                        ffgsv,
      66              :                                                        ffghsp,
      67              :                                                        ffgkyn,
      68              :                                                        ffinit,
      69              :                                                        ffcrim,
      70              :                                                        ffppx,
      71              :                                                        allocateLongs };
      72            4 : }
      73              : 
      74              : } // namespace fitsFileDetail
      75              : 
      76              : template class fitsFile<short, verbose::d>;
      77              : 
      78              : template class fitsFile<unsigned short, verbose::d>;
      79              : 
      80              : template class fitsFile<int, verbose::d>;
      81              : 
      82              : template class fitsFile<unsigned int, verbose::d>;
      83              : 
      84              : template class fitsFile<float, verbose::d>;
      85              : 
      86              : template class fitsFile<double, verbose::d>;
      87              : 
      88              : } // namespace fits
      89              : } // namespace mx
        

Generated by: LCOV version 2.0-1