|
Isis 3.0 Developer's Reference (API) |
Home |
00001 #ifndef TableField_h 00002 #define TableField_h 00003 00025 #include <vector> 00026 00027 #include <QString> 00028 00029 namespace Isis { 00030 class PvlGroup; 00067 class TableField { 00068 public: 00072 enum Type { 00073 Integer, 00074 Double, 00075 Text, 00077 Real 00078 }; 00079 00080 //Constructors and Destructor 00081 TableField(const QString &name, Type type, int size = 1); 00082 TableField(PvlGroup &field); 00083 ~TableField(); 00084 00085 QString name() const; 00086 Type type() const; 00087 bool isInteger() const; 00088 bool isDouble() const; 00089 bool isText() const; 00090 bool isReal() const; 00091 int bytes() const; 00092 int size() const; 00093 00094 operator int() const; 00095 operator double() const; 00096 operator float() const; 00097 operator QString() const; 00098 operator std::vector<int>() const; 00099 operator std::vector<double>() const; 00100 operator std::vector<float>() const; 00101 00102 void operator=(const int value); 00103 void operator=(const double value); 00104 void operator=(const float value); 00105 void operator=(const QString &value); 00106 void operator=(const std::vector<int> &values); 00107 void operator=(const std::vector<double> &values); 00108 void operator=(const std::vector<float> &value); 00109 void operator=(const char *buf); 00110 void operator=(const void *buf); 00111 00112 PvlGroup pvlGroup(); 00113 00114 private: 00115 QString m_name; 00116 Type m_type; 00117 int m_size; 00119 int m_bytes; 00120 std::vector<int> m_ivalues; 00123 std::vector<double> m_dvalues; 00126 std::vector<float> m_rvalues; 00129 QString m_svalue; 00132 }; 00133 }; 00134 00135 #endif