KeywordCreator.h

00001 //      This is version 1.6 release dated Nov 2006
00002 //      Astrophysics Science Division,
00003 //      NASA/ Goddard Space Flight Center
00004 //      HEASARC
00005 //      http://heasarc.gsfc.nasa.gov
00006 //      e-mail: ccfits@legacy.gsfc.nasa.gov
00007 //
00008 //      Original author: Ben Dorman, L3-Communications EER Systems Inc.
00009 
00010 #ifndef KEYWORDCREATOR_H
00011 #define KEYWORDCREATOR_H 1
00012 
00013 // KeyData
00014 #include "KeyData.h"
00015 // FitsError
00016 #include "FitsError.h"
00017 
00018 namespace CCfits {
00019   class HDU;
00020 
00021 } // namespace CCfits
00022 
00023 
00024 namespace CCfits {
00025 
00026 
00027 
00028   class KeywordCreator 
00029   {
00030 
00031     public:
00032         KeywordCreator (HDU* p);
00033         virtual ~KeywordCreator();
00034 
00035         virtual Keyword* MakeKeyword (const String& keyName, const String& comment = String("")) = 0;
00036         static Keyword* getKeyword (const String& keyName, HDU* p);
00037         //      Additional Public Declarations
00038         virtual void reset ();
00039         virtual Keyword* createKeyword (const String& keyName, const String& comment = String(""));
00040         //      This version of getKeyword is for reading a keyword
00041         //      in with a specified type.
00042         static Keyword* getKeyword (const String& keyName, ValueType keyType, HDU* p);
00043         static Keyword* getKeyword (int keyNumber, HDU* p);
00044 
00045       // Additional Public Declarations
00046 
00047     protected:
00048         HDU* forHDU ();
00049 
00050       // Additional Protected Declarations
00051 
00052     private:
00053         KeywordCreator(const KeywordCreator &right);
00054         KeywordCreator & operator=(const KeywordCreator &right);
00055 
00056         static Keyword* parseRecord (const String& name, const String& valueString, const String& comment, HDU* hdu);
00057         static bool isContinued (const String& value);
00058         static void getLongValueString (HDU* p, const String& keyName, String& value);
00059 
00060       // Additional Private Declarations
00061 
00062     private: //## implementation
00063       // Data Members for Class Attributes
00064         Keyword *m_keyword;
00065 
00066       // Data Members for Associations
00067         HDU* m_forHDU;
00068 
00069       // Additional Implementation Declarations
00070 
00071   };
00072 
00073   // Class CCfits::KeywordCreator 
00074 
00075   inline void KeywordCreator::reset ()
00076   {
00077     m_keyword=0;
00078 
00079   }
00080 
00081   inline HDU* KeywordCreator::forHDU ()
00082   {
00083     return m_forHDU;
00084   }
00085 
00086 } // namespace CCfits
00087 
00088 
00089 #endif

Generated on Fri Nov 3 17:09:05 2006 for CCfits by  doxygen 1.4.7