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