CCfits  2.4
NewColumn.h
1 // Astrophysics Science Division,
2 // NASA/ Goddard Space Flight Center
3 // HEASARC
4 // http://heasarc.gsfc.nasa.gov
5 // e-mail: ccfits@legacy.gsfc.nasa.gov
6 //
7 // Original author: Ben Dorman
8 
9 #ifndef NEWCOLUMN_H
10 #define NEWCOLUMN_H 1
11 
12 // valarray
13 #include <valarray>
14 // ColumnCreator
15 #include "ColumnCreator.h"
16 // FITSUtil
17 #include "FITSUtil.h"
18 
19 
20 namespace CCfits {
21 
22 
23 
24  template <typename T>
25  class NewColumn : public ColumnCreator //## Inherits: <unnamed>%394167D103C5
26  {
27 
28  public:
29  NewColumn (vector<T>& data);
30  virtual ~NewColumn();
31 
32  // Additional Public Declarations
33 
34  protected:
35  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);
36 
37  // Additional Protected Declarations
38 
39  private:
40  NewColumn(const NewColumn< T > &right);
41  NewColumn< T > & operator=(const NewColumn< T > &right);
42 
43  // Additional Private Declarations
44 
45  private: //## implementation
46  // Additional Implementation Declarations
47 
48  };
49 
50 
51 
52  template <typename T>
53  class NewVectorColumn : public ColumnCreator //## Inherits: <unnamed>%394167CE0009
54  {
55 
56  public:
57  NewVectorColumn (std::vector<std::valarray<T> >& data);
58  virtual ~NewVectorColumn();
59 
60  // Additional Public Declarations
61 
62  protected:
63  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);
64 
65  // Additional Protected Declarations
66 
67  private:
68  NewVectorColumn(const NewVectorColumn< T > &right);
69  NewVectorColumn< T > & operator=(const NewVectorColumn< T > &right);
70 
71  // Additional Private Declarations
72 
73  private: //## implementation
74  // Additional Implementation Declarations
75 
76  };
77 
78  // Parameterized Class CCfits::NewColumn
79 
80  // Parameterized Class CCfits::NewVectorColumn
81 
82  // Parameterized Class CCfits::NewColumn
83 
84  template <typename T>
85  NewColumn<T>::NewColumn (vector<T>& data)
86  : m_newData(data)
87  {
88  }
89 
90 
91  template <typename T>
92  NewColumn<T>::~NewColumn()
93  {
94  }
95 
96 
97  template <typename T>
98  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)
99  {
100  FITSUtils::MatchType<T> findType;
101 
102 
103  ColumnData<T>* newColumn = new ColumnData(index,name,findType(),format,unit,p,repeat,width,comment);
104  newColumn->data(m_newData);
105  return newColumn;
106  }
107 
108  // Additional Declarations
109 
110  // Parameterized Class CCfits::NewVectorColumn
111 
112  template <typename T>
113  NewVectorColumn<T>::NewVectorColumn (std::vector<std::valarray<T> >& data)
114  {
115  }
116 
117 
118  template <typename T>
119  NewVectorColumn<T>::~NewVectorColumn()
120  {
121  }
122 
123 
124  template <typename T>
125  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)
126  {
127  }
128 
129  // Additional Declarations
130 
131 } // namespace CCfits
132 
133 
134 #endif
const String & comment() const
return the comment field of the keyword
Definition: Keyword.h:307
const String & name() const
return the name of a keyword
Definition: Keyword.h:312
Namespace enclosing all CCfits classes and globals definitions.
Definition: AsciiTable.cxx:26