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