Isis 3 Programmer Reference
Column.h
Go to the documentation of this file.
1 #ifndef Column_h
2 #define Column_h
3 
26 #include <vector>
27 
28 #include <QString>
29 
30 namespace Isis {
54  class Column {
55  public:
56 
60  enum Align {
61  NoAlign = 0,
62  Right = 1,
63  Left = 2,
64  Decimal = 3
65  };
66 
70  enum Type {
71  NoType = 0,
72  Integer = 1,
73  Real = 2,
74  String = 3,
75  Pixel = 4
76  };
77 
78  Column();
79  Column(QString name, int width, Column::Type type, Column::Align align = Right);
80  void SetName(QString name);
81  void SetWidth(unsigned int width);
82  void SetType(Column::Type type);
83  void SetAlignment(Column::Align alignment);
84  void SetPrecision(unsigned int precision);
85 
86  QString Name() const;
87  unsigned int Width() const;
88  Column::Type DataType() const;
89  Column::Align Alignment() const;
90  unsigned int Precision() const;
91 
92 
93  private:
95  QString p_name;
96 
98  unsigned int p_width;
99 
102 
105 
107  unsigned int p_precision;
108  };
109 };
110 
111 #endif
void SetWidth(unsigned int width)
Sets the width of the Column, in text columns.
Definition: Column.cpp:83
Integer data type.
Definition: Column.h:73
unsigned int p_precision
Precision of the data in the Column.
Definition: Column.h:107
unsigned int Precision() const
Get the Column&#39;s precision.
Definition: Column.cpp:187
unsigned int Width() const
Get the Column&#39;s width.
Definition: Column.cpp:157
void SetName(QString name)
Sets the Column name, or header.
Definition: Column.cpp:70
Column::Align p_align
Alignment of the data in the Column.
Definition: Column.h:104
Column()
Constructor.
Definition: Column.cpp:35
void SetAlignment(Column::Align alignment)
Sets the alignment of the Column.
Definition: Column.cpp:116
void SetPrecision(unsigned int precision)
Sets the precision of the Column, for real number values.
Definition: Column.cpp:134
Column::Type DataType() const
Returns the type of data this column will contain.
Definition: Column.cpp:167
right alignment
Definition: Column.h:62
Real data type.
Definition: Column.h:74
Align
Alignment of data in the Column.
Definition: Column.h:60
Column::Align Alignment() const
Get the Column&#39;s alignment.
Definition: Column.cpp:177
Column::Type p_type
Type of the data in the Column.
Definition: Column.h:101
QString p_name
Name of the Column.
Definition: Column.h:95
Type
Type of data in the Column.
Definition: Column.h:70
unsigned int p_width
Width of the Column.
Definition: Column.h:98
decimal alignment
Definition: Column.h:64
left alignment
Definition: Column.h:63
Store and/or manipulate pixel values.
Definition: Pixel.h:63
no alignment
Definition: Column.h:61
QString Name() const
Get the Column&#39;s name.
Definition: Column.cpp:148
Format ascii tables.
Definition: Column.h:54
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void SetType(Column::Type type)
Sets the data type of the Column.
Definition: Column.cpp:97
No data type.
Definition: Column.h:72