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

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