Isis Developer Reference
Column.h
Go to the documentation of this file.
1 #ifndef Column_h
2 #define Column_h
3 
9 /* SPDX-License-Identifier: CC0-1.0 */
10 
11 #include <vector>
12 
13 #include <QString>
14 
15 namespace Isis {
39  class Column {
40  public:
41 
45  enum Align {
46  NoAlign = 0,
47  Right = 1,
48  Left = 2,
49  Decimal = 3
50  };
51 
55  enum Type {
56  NoType = 0,
57  Integer = 1,
58  Real = 2,
59  String = 3,
60  Pixel = 4
61  };
62 
63  Column();
64  Column(QString name, int width, Column::Type type, Column::Align align = Right);
65  void SetName(QString name);
66  void SetWidth(unsigned int width);
67  void SetType(Column::Type type);
68  void SetAlignment(Column::Align alignment);
69  void SetPrecision(unsigned int precision);
70 
71  QString Name() const;
72  unsigned int Width() const;
73  Column::Type DataType() const;
74  Column::Align Alignment() const;
75  unsigned int Precision() const;
76 
77 
78  private:
80  QString p_name;
81 
83  unsigned int p_width;
84 
86  Column::Type p_type;
87 
89  Column::Align p_align;
90 
92  unsigned int p_precision;
93  };
94 };
95 
96 #endif
Isis::Column::NoAlign
@ NoAlign
no alignment
Definition: Column.h:46
Isis::Column::Left
@ Left
left alignment
Definition: Column.h:48
Isis::Column::Precision
unsigned int Precision() const
Get the Column's precision.
Definition: Column.cpp:172
Isis::Column::Pixel
@ Pixel
String data type.
Definition: Column.h:60
Isis::Column::Decimal
@ Decimal
decimal alignment
Definition: Column.h:49
Isis::Column::Column
Column()
Constructor.
Definition: Column.cpp:20
Isis::Column::Align
Align
Alignment of data in the Column.
Definition: Column.h:45
Isis::Column::Integer
@ Integer
No data type.
Definition: Column.h:57
Isis::Column::Width
unsigned int Width() const
Get the Column's width.
Definition: Column.cpp:142
Isis::Column
Format ascii tables.
Definition: Column.h:39
Isis::Column::Real
@ Real
Integer data type.
Definition: Column.h:58
Isis::Column::DataType
Column::Type DataType() const
Returns the type of data this column will contain.
Definition: Column.cpp:152
IString.h
Isis::Column::SetAlignment
void SetAlignment(Column::Align alignment)
Sets the alignment of the Column.
Definition: Column.cpp:101
Isis::Column::SetPrecision
void SetPrecision(unsigned int precision)
Sets the precision of the Column, for real number values.
Definition: Column.cpp:119
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Column::Name
QString Name() const
Get the Column's name.
Definition: Column.cpp:133
Isis::Column::Alignment
Column::Align Alignment() const
Get the Column's alignment.
Definition: Column.cpp:162
Isis::Column::SetType
void SetType(Column::Type type)
Sets the data type of the Column.
Definition: Column.cpp:82
Isis::Column::Type
Type
Type of data in the Column.
Definition: Column.h:55
Isis::Column::NoType
@ NoType
Definition: Column.h:56
Isis::IException
Isis exception class.
Definition: IException.h:91
Column.h
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::Pixel
Store and/or manipulate pixel values.
Definition: Pixel.h:48
Isis::Column::String
@ String
Real data type.
Definition: Column.h:59
Isis::Column::SetName
void SetName(QString name)
Sets the Column name, or header.
Definition: Column.cpp:55
Isis::Column::SetWidth
void SetWidth(unsigned int width)
Sets the width of the Column, in text columns.
Definition: Column.cpp:68
Isis::Column::Right
@ Right
right alignment
Definition: Column.h:47
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126