Isis 3.0 Developer's Reference (API) |
Home |
00001 #ifndef Column_h 00002 #define Column_h 00003 00026 #include <vector> 00027 #include <string> 00028 00029 namespace Isis { 00046 class Column { 00047 public: 00048 00052 enum Align { 00053 NoAlign = 0, 00054 Right = 1, 00055 Left = 2, 00056 Decimal = 3 00057 }; 00058 00062 enum Type { 00063 NoType = 0, 00064 Integer = 1, 00065 Real = 2, 00066 String = 3, 00067 Pixel = 4 00068 }; 00069 00070 Column(); 00071 Column(std::string name, int width, Column::Type type, Column::Align align = Right); 00072 void SetName(std::string name); 00073 void SetWidth(unsigned int width); 00074 void SetType(Column::Type type); 00075 void SetAlignment(Column::Align alignment); 00076 void SetPrecision(unsigned int precision); 00077 00079 std::string Name() { 00080 return p_name; 00081 }; 00082 00084 unsigned int Width() { 00085 return p_width; 00086 }; 00087 00088 Column::Type DataType(); 00089 00091 Column::Align Alignment() { 00092 return p_align; 00093 }; 00094 00096 unsigned int Precision() { 00097 return p_precision; 00098 }; 00099 00100 private: 00102 std::string p_name; 00103 00105 unsigned int p_width; 00106 00108 Column::Type p_type; 00109 00111 Column::Align p_align; 00112 00114 unsigned int p_precision; 00115 }; 00116 }; 00117 00118 #endif