Isis 3 Programmer Reference
Column.h
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 
87 
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::Decimal
@ Decimal
decimal alignment
Definition: Column.h:49
Isis::Column::Column
Column()
Constructor.
Definition: Column.cpp:20
Isis::Column::p_type
Column::Type p_type
Type of the data in the Column.
Definition: Column.h:86
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::p_precision
unsigned int p_precision
Precision of the data in the Column.
Definition: Column.h:92
Isis::Column::DataType
Column::Type DataType() const
Returns the type of data this column will contain.
Definition: Column.cpp:152
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
Isis::Column::p_name
QString p_name
Name of the Column.
Definition: Column.h:80
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::Pixel
Store and/or manipulate pixel values.
Definition: Pixel.h:48
Isis::Column::p_width
unsigned int p_width
Width of the Column.
Definition: Column.h:83
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::p_align
Column::Align p_align
Alignment of the data in the Column.
Definition: Column.h:89
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