00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef NEWCOLUMN_H
00011 #define NEWCOLUMN_H 1
00012
00013
00014 #include <valarray>
00015
00016 #include "ColumnCreator.h"
00017
00018 #include "FITSUtil.h"
00019
00020
00021 namespace CCfits {
00022
00023
00024
00025 template <typename T>
00026 class NewColumn : public ColumnCreator
00027 {
00028
00029 public:
00030 NewColumn (vector<T>& data);
00031 virtual ~NewColumn();
00032
00033
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
00039
00040 private:
00041 NewColumn(const NewColumn< T > &right);
00042 NewColumn< T > & operator=(const NewColumn< T > &right);
00043
00044
00045
00046 private:
00047
00048
00049 };
00050
00051
00052
00053 template <typename T>
00054 class NewVectorColumn : public ColumnCreator
00055 {
00056
00057 public:
00058 NewVectorColumn (std::vector<std::valarray<T> >& data);
00059 virtual ~NewVectorColumn();
00060
00061
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
00067
00068 private:
00069 NewVectorColumn(const NewVectorColumn< T > &right);
00070 NewVectorColumn< T > & operator=(const NewVectorColumn< T > &right);
00071
00072
00073
00074 private:
00075
00076
00077 };
00078
00079
00080
00081
00082
00083
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
00110
00111
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
00131
00132 }
00133
00134
00135 #endif