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