CCfits 2.6

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List

ColumnCreator.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 COLUMNCREATOR_H
10 #define COLUMNCREATOR_H 1
11 #include <iostream>
12
13 // ColumnVectorData
14 #include "ColumnVectorData.h"
15 // ColumnData
16 #include "ColumnData.h"
17
18 namespace CCfits {
19 class Table;
20 class Column;
21
22 } // namespace CCfits
23 #include <string>
24 #include <vector>
25
26
27 namespace CCfits {
28
29
30
31 class ColumnCreator
32 {
33
34 public:
35 ColumnCreator (Table* p);
36 virtual ~ColumnCreator();
37
38 void reset ();
39 // getColumn is a calling function for MakeColumn, i.e.
40 // it specifies a column in an existing file to be "got"
41 Column * getColumn (int number, const String& name, const String& format, const String& unit = "");
42 // createColumn is for specifying input data for creating
43 // new columns in tables.
44 Column * createColumn (int number, ValueType type, const String &name, const String &format, const String &unit, long repeat = 1, long width = 1, double scaleFactor = 1., double offset = 0, const String &comment = "");
45
46 // Additional Public Declarations
47
48 protected:
49 // MakeColumn is a virtual function that makes a Column
50 // object with appropriate data member from an existing
51 // column in a file.
52 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);
53
54 // Additional Protected Declarations
55
56 private:
57 void getScaling (int index, int& type, long& repeat, long& width, double& tscale, double& tzero);
58 const Table* parent () const;
59 void parent (Table* value);
60
61 // Additional Private Declarations
62
63 private: //## implementation
64 // Data Members for Class Attributes
65 Column *m_column;
66 Table* m_parent;
67
68 // Additional Implementation Declarations
69
70 };
71
72 // Class CCfits::ColumnCreator
73
74 inline void ColumnCreator::reset ()
75 {
76 m_column = 0;
77 }
78
79 inline const Table* ColumnCreator::parent () const
80 {
81 return m_parent;
82 }
83
84 inline void ColumnCreator::parent (Table* value)
85 {
86 m_parent = value;
87 }
88
89 } // namespace CCfits
90
91
92 #endif
CCfits::ValueType
ValueType
CCfits value types and their CFITSIO equivalents (in caps)
Definition: CCfits.h:81