NewColumn.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 NEWCOLUMN_H
00013 #define NEWCOLUMN_H 1
00014 
00015 // valarray
00016 #include <valarray>
00017 // ColumnCreator
00018 #include "ColumnCreator.h"
00019 // FITSUtil
00020 #include "FITSUtil.h"
00021 
00022 
00023 namespace CCfits {
00024 
00025 
00026 
00027   template <typename T>
00028   class NewColumn : public ColumnCreator  //## Inherits: <unnamed>%394167D103C5
00029   {
00030 
00031     public:
00032         NewColumn (vector<T>& data);
00033         virtual ~NewColumn();
00034 
00035       // Additional Public Declarations
00036 
00037     protected:
00038         virtual Column* MakeColumn (const int index, const string &name, const string &format, const string &unit, const long repeat, const long width, const string &comment = "", const int decimals = 0);
00039 
00040       // Additional Protected Declarations
00041 
00042     private:
00043         NewColumn(const NewColumn< T > &right);
00044         NewColumn< T > & operator=(const NewColumn< T > &right);
00045 
00046       // Additional Private Declarations
00047 
00048     private: //## implementation
00049       // Additional Implementation Declarations
00050 
00051   };
00052 
00053 
00054 
00055   template <typename T>
00056   class NewVectorColumn : public ColumnCreator  //## Inherits: <unnamed>%394167CE0009
00057   {
00058 
00059     public:
00060         NewVectorColumn (std::vector<std::valarray<T> >& data);
00061         virtual ~NewVectorColumn();
00062 
00063       // Additional Public Declarations
00064 
00065     protected:
00066         virtual Column * MakeColumn (const int index, const string &name, const string &format, const string &unit, const long repeat, const long width, const string &comment = "", const int decimals = 0);
00067 
00068       // Additional Protected Declarations
00069 
00070     private:
00071         NewVectorColumn(const NewVectorColumn< T > &right);
00072         NewVectorColumn< T > & operator=(const NewVectorColumn< T > &right);
00073 
00074       // Additional Private Declarations
00075 
00076     private: //## implementation
00077       // Additional Implementation Declarations
00078 
00079   };
00080 
00081   // Parameterized Class CCfits::NewColumn 
00082 
00083   // Parameterized Class CCfits::NewVectorColumn 
00084 
00085   // Parameterized Class CCfits::NewColumn 
00086 
00087   template <typename T>
00088   NewColumn<T>::NewColumn (vector<T>& data)
00089      : m_newData(data)
00090   {
00091   }
00092 
00093 
00094   template <typename T>
00095   NewColumn<T>::~NewColumn()
00096   {
00097   }
00098 
00099 
00100   template <typename T>
00101   Column* NewColumn<T>::MakeColumn (const int index, const string &name, const string &format, const string &unit, const long repeat, const long width, const string &comment, const int decimals)
00102   {
00103    FITSUtils::MatchType<T> findType;
00104 
00105 
00106    ColumnData<T>* newColumn = new ColumnData(index,name,findType(),format,unit,p,repeat,width,comment);  
00107    newColumn->data(m_newData);
00108    return newColumn;   
00109   }
00110 
00111   // Additional Declarations
00112 
00113   // Parameterized Class CCfits::NewVectorColumn 
00114 
00115   template <typename T>
00116   NewVectorColumn<T>::NewVectorColumn (std::vector<std::valarray<T> >& data)
00117   {
00118   }
00119 
00120 
00121   template <typename T>
00122   NewVectorColumn<T>::~NewVectorColumn()
00123   {
00124   }
00125 
00126 
00127   template <typename T>
00128   Column * NewVectorColumn<T>::MakeColumn (const int index, const string &name, const string &format, const string &unit, const long repeat, const long width, const string &comment, const int decimals)
00129   {
00130   }
00131 
00132   // Additional Declarations
00133 
00134 } // namespace CCfits
00135 
00136 
00137 #endif

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