00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef FITSBASE_H
00011 #define FITSBASE_H 1
00012
00013
00014 #include <string>
00015
00016 #include "fitsio.h"
00017
00018 #include <map>
00019
00020 #include "CCfits.h"
00021
00022 namespace CCfits {
00023 class PHDU;
00024 class ExtHDU;
00025
00026 }
00027 using std::string;
00028
00029
00030 namespace CCfits {
00031
00032
00033
00034 class FITSBase
00035 {
00036
00037 public:
00038 FITSBase(const FITSBase &right);
00039 FITSBase (const String& fileName, RWmode rwmode);
00040 ~FITSBase();
00041
00042 void destroyPrimary ();
00043 void destroyExtensions ();
00044 FITSBase* clone ();
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 & operator=(const FITSBase &right);
00061
00062
00063
00064 private:
00065
00066 int m_currentCompressionTileDim;
00067
00068
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
00077
00078 };
00079
00080
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 fitsfile*& FITSBase::fptr ()
00118 {
00119 return m_fptr;
00120 }
00121
00122 }
00123
00124
00125 #endif