1 #ifndef ImportPdsTable_h     2 #define ImportPdsTable_h    27 #include <QStringList>   120                      const QString &pdsTabFile=
"",
   121                      const QString &pdsTableName =
"TABLE");
   124       QString 
name() 
const;
   130       void load(
const QString &pdsLabFile, 
const QString &pdsTabFile = 
"", 
   131                 const QString &pdsTableName = 
"TABLE");
   133       bool hasColumn(
const QString &colName) 
const;
   135                                 const bool &formatted = 
true) 
const;
   139       QString 
getType(
const QString &colName) 
const;
   140       bool setType(
const QString &colName, 
const QString &dataType);
   144                         const QString &isisTableName);
   146                         const QString &isisTableName);
   172                              const QString &delimiter = 
"") 
const;
   175                                   const QString &delimiter = 
"") 
const;
   180       virtual bool processRow(
const int &row, 
const QString &rowdata);
   186       void loadLabel(
const QString &labfile, QString &tblfile,
   187                      const QString &tblname = 
"");
 virtual bool processRow(const int &row, const QString &rowdata)
Process a freshly read PDS table line of data. 
 
int m_colnum
Column number. 
 
int rows() const
Returns the number of rows in the table. 
 
QString getGenericType(const QString &ttype) const
Determine generic data type of a column. 
 
Table importTable(const QString &isisTableName)
Populate a Table object with the PDS table and return it. 
 
TableRecord extractBinary(char *rowBuffer, TableRecord &record) const
This method is used to set the field values for the given record. 
 
int m_rowBytes
The number of bytes for one PDS table row. 
 
int m_itemBytes
Number bytes per item. 
 
QString name() const
Return the name of the PDS table. 
 
void fillTable(Table &table, const ColumnTypes &columns, TableRecord &record) const
Fill the ISIS Table object with PDS table data. 
 
void loadTable(const QString &tabfile)
Loads the contents of a PDS table data file. 
 
QString m_name
Name of column. 
 
QString getType(const QString &colName) const
Get the type associated with the specified column. 
 
QStringList getColumnNames(const bool &formatted=true) const
Return the names of all the columns. 
 
QStringList getColumnFields(const QString &tline, const ColumnDescr &cdesc, const QString &delimiter="") const
Extracts column fields from a QString based upon a description. 
 
int m_pdsTableStart
The start byte of the PDS table data. 
 
void load(const QString &pdsLabFile, const QString &pdsTabFile="", const QString &pdsTableName="TABLE")
Loads a PDS table label and (optional) data file. 
 
void setPdsByteOrder(QString byteOrder)
Sets the byte order for BINARY PDS table files. 
 
virtual ~ImportPdsTable()
Destructs the ImportPdsTable object. 
 
void init()
Initialize object variables. 
 
QString getColumnName(const unsigned int &index=0, const bool &formatted=true) const
Returns the name of the specifed column. 
 
int columns() const
Returns the number of columns in the table. 
 
void setName(const QString &name="TABLE")
Set the name of the PDS table object. 
 
TableRecord makeRecord(const ColumnTypes &ctypes)
Creates a TableRecord for columns. 
 
QString m_pdsTableType
The INTERCHANGE_FORMAT value for the table. 
 
ColumnTypes m_coldesc
Column descriptions. 
 
bool hasColumn(const QString &colName) const
This method determines whether the PDS table has a column with the given name. 
 
QString m_pdsTableFile
The name of the file containing the table data. 
 
int m_items
Number of items in column. 
 
QString getColumnValue(const QString &tline, const ColumnDescr &cdesc, const QString &delimiter="") const
Extracts a column from a QString based upon a description. 
 
bool setType(const QString &colName, const QString &dataType)
Change the datatype for a column. 
 
TableField makeFieldFromBinaryTable(const ColumnDescr &cdesc)
Creates an empty TableField with the appropriate type from a binary PDS table column description...
 
int m_trows
Number rows in table according to label. 
 
Class for storing Table blobs information. 
 
QString m_tableName
The name of the PDS table object. 
 
QString getFormattedName(const QString &colname) const
Converts a column name to a camel-case after it has been cleansed. 
 
void loadLabel(const QString &labfile, QString &tblfile, const QString &tblname="")
Loads the contents of a PDS table label description. 
 
int m_startByte
Starting byte of data. 
 
ImportPdsTable()
Default constructor. 
 
Namespace for ISIS/Bullet specific routines. 
 
ColumnDescr getColumnDescription(PvlObject &colobj, int nth) const
Extract a column description from a COLUMN object. 
 
TableField makeField(const ColumnDescr &cdesc)
Creates a TableField for the column type. 
 
QString m_byteOrder
The byte order of the PDS table file, if binary. 
 
Class for storing an Isis::Table's field information. 
 
TableField & extract(const Columns &columns, const ColumnDescr &cdesc, TableField &field) const
Extract a TableField from a PDS column in the text row. 
 
int m_numBytes
Number bytes in column. 
 
QString m_dataType
PDS table DATA_TYPE of column. 
 
Contains Pvl Groups and Pvl Objects. 
 
const ColumnDescr & getColumnDescriptor(const int &nth) const
Retrieve a column description by index. 
 
Import a PDS table file with a label description. 
 
int m_recordBytes
The number of bytes for one Isis table record. 
 
ColumnDescr * findColumn(const QString &colName)
Searches internal column descriptors for a named column.