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