KeywordCreator.h

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

Generated on Tue Feb 5 11:26:56 2008 for CCfits by  doxygen 1.5.4