CCfits  2.4
FITSBase.h
00001 //      Astrophysics Science Division,
00002 //      NASA/ Goddard Space Flight Center
00003 //      HEASARC
00004 //      http://heasarc.gsfc.nasa.gov
00005 //      e-mail: ccfits@legacy.gsfc.nasa.gov
00006 //
00007 //      Original author: Ben Dorman
00008 
00009 #ifndef FITSBASE_H
00010 #define FITSBASE_H 1
00011 
00012 // fitsio
00013 #include "fitsio.h"
00014 // string
00015 #include <string>
00016 // map
00017 #include <map>
00018 // CCfitsHeader
00019 #include "CCfits.h"
00020 
00021 namespace CCfits {
00022   class PHDU;
00023   class ExtHDU;
00024 
00025 } // namespace CCfits
00026 using std::string;
00027 
00028 
00029 namespace CCfits {
00030 
00031 
00032 
00033   class FITSBase 
00034   {
00035 
00036     public:
00037         FITSBase (const String& fileName, RWmode rwmode);
00038         ~FITSBase();
00039 
00040         void destroyPrimary ();
00041         void destroyExtensions ();
00042         int currentCompressionTileDim () const;
00043         void currentCompressionTileDim (int value);
00044         RWmode mode ();
00045         std::string& currentExtensionName ();
00046         std::string& name ();
00047         PHDU*& pHDU ();
00048         ExtMap& extension ();
00049 
00050         const ExtMap& extension() const;
00051         fitsfile*& fptr ();
00052 
00053       // Additional Public Declarations
00054 
00055     protected:
00056       // Additional Protected Declarations
00057 
00058     private:
00059         FITSBase(const FITSBase &right);
00060         FITSBase & operator=(const FITSBase &right);
00061 
00062       // Additional Private Declarations
00063 
00064     private: //## implementation
00065       // Data Members for Class Attributes
00066         int m_currentCompressionTileDim;
00067 
00068       // Data Members for Associations
00069         RWmode m_mode;
00070         std::string m_currentExtensionName;
00071         std::string m_name;
00072         PHDU* m_pHDU;
00073         ExtMap m_extension;
00074         fitsfile* m_fptr;
00075 
00076       // Additional Implementation Declarations
00077 
00078   };
00079 
00080   // Class CCfits::FITSBase 
00081 
00082   inline int FITSBase::currentCompressionTileDim () const
00083   {
00084     return m_currentCompressionTileDim;
00085   }
00086 
00087   inline void FITSBase::currentCompressionTileDim (int value)
00088   {
00089     m_currentCompressionTileDim = value;
00090   }
00091 
00092   inline RWmode FITSBase::mode ()
00093   {
00094     return m_mode;
00095   }
00096 
00097   inline std::string& FITSBase::currentExtensionName ()
00098   {
00099     return m_currentExtensionName;
00100   }
00101 
00102   inline std::string& FITSBase::name ()
00103   {
00104     return m_name;
00105   }
00106 
00107   inline PHDU*& FITSBase::pHDU ()
00108   {
00109     return m_pHDU;
00110   }
00111 
00112   inline ExtMap& FITSBase::extension ()
00113   {
00114     return m_extension;
00115   }
00116 
00117   inline const ExtMap& FITSBase::extension() const
00118   {
00119      return m_extension;
00120   }
00121 
00122   inline fitsfile*& FITSBase::fptr ()
00123   {
00124     return m_fptr;
00125   }
00126 
00127 } // namespace CCfits
00128 
00129 
00130 #endif