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