NewKeyword.h

00001 //   Read the documentation to learn more about C++ code generator
00002 //   versioning.
00003 //      This is version 1.7 release dated June 2007
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, L3-Communications EER Systems Inc.
00011 
00012 #ifndef NEWKEYWORD_H
00013 #define NEWKEYWORD_H 1
00014 
00015 // KeyData
00016 #include "KeyData.h"
00017 // KeywordCreator
00018 #include "KeywordCreator.h"
00019 // FITSUtil
00020 #include "FITSUtil.h"
00021 
00022 
00023 namespace CCfits {
00024 
00025 
00026 
00027   template <typename T>
00028   class NewKeyword : public KeywordCreator  //## Inherits: <unnamed>%39355AA90209
00029   {
00030 
00031     public:
00032         //      Parameterized Class NewKeyword
00033         NewKeyword (HDU* p, T value);
00034         virtual ~NewKeyword();
00035 
00036         //      Additional Protected Declarations
00037         virtual Keyword* MakeKeyword (const String& keyName, const String& keyComment = String(""));
00038         const T keyData () const;
00039         void keyData (T value);
00040 
00041       // Additional Public Declarations
00042 
00043     protected:
00044       // Additional Protected Declarations
00045 
00046     private:
00047         NewKeyword();
00048 
00049         NewKeyword(const NewKeyword< T > &right);
00050         NewKeyword< T > & operator=(const NewKeyword< T > &right);
00051 
00052       // Additional Private Declarations
00053 
00054     private: //## implementation
00055       // Data Members for Class Attributes
00056         T m_keyData;
00057 
00058       // Additional Implementation Declarations
00059 
00060   };
00061 
00062   // Parameterized Class CCfits::NewKeyword 
00063 
00064   template <typename T>
00065   inline const T NewKeyword<T>::keyData () const
00066   {
00067     return m_keyData;
00068   }
00069 
00070   template <typename T>
00071   inline void NewKeyword<T>::keyData (T value)
00072   {
00073     m_keyData = value;
00074   }
00075 
00076   // Parameterized Class CCfits::NewKeyword 
00077 
00078   template <typename T>
00079   NewKeyword<T>::NewKeyword (HDU* p, T value)
00080       : KeywordCreator(p), m_keyData(value)
00081   {
00082   }
00083 
00084 
00085   template <typename T>
00086   NewKeyword<T>::~NewKeyword()
00087   {
00088   }
00089 
00090 
00091   template <typename T>
00092   Keyword* NewKeyword<T>::MakeKeyword (const String& keyName, const String& keyComment)
00093   {
00094   FITSUtil::MatchType<T> keyType;
00095   return new KeyData<T>(keyName,keyType(),m_keyData,forHDU(),keyComment);
00096   }
00097 
00098   // Additional Declarations
00099 
00100 } // namespace CCfits
00101 
00102 
00103 #endif

Generated on Thu Jun 28 11:49:08 2007 for CCfits by  doxygen 1.4.7