Isis 3 Programmer Reference
|
Export a PDS table from an Isis3 Table. More...
#include <ExportPdsTable.h>
Public Member Functions | |
ExportPdsTable (Table isisTable) | |
Construct an ExportPdsTable object and set default member variable values. More... | |
~ExportPdsTable () | |
Destructs for ExportPdsTable objects. More... | |
PvlObject | exportTable (char *pdsTableBuffer, int pdsFileRecordBytes, QString pdsByteOrder) |
This methods fills the given buffer with the binary PDS table data and returns label information. More... | |
QString | formatPdsTableName () |
Format the PDS table object name using the Isis3 table name. More... | |
Static Public Member Functions | |
static QString | formatPdsTableName (QString isisTableName) |
Static method that formats the given Isis3 table name in PDS format. More... | |
Private Member Functions | |
void | Pack (TableRecord record, char *buffer, EndianSwapper *endianSwap) |
Pack the buffer with data from the table record, swapping bytes if needed. More... | |
PvlObject | fillMetaData () |
Creates a PvlObject to be added to the PDS label with needed TABLE information. More... | |
Private Attributes | |
Table * | m_isisTable |
Input Isis3 Table object to be exported. More... | |
int | m_numRows |
The number of rows in the exported PDS table. More... | |
int | m_outputRecordBytes |
The number of bytes per record in the exported PDS file. More... | |
int | m_rowBytes |
The number of bytes per row in the exported PDS table. More... | |
QString | m_pdsByteOrder |
A string indicating the byte order of the exported PDS file. More... | |
Export a PDS table from an Isis3 Table.
This class ingests an Isis3 Table and converts it to a PDS Table.
NOTE: This class exports BINARY format PDS tables. The PDS Standards Reference document indicates that for files containing multiple tables with binary data, the records should be FIXED_LENGTH (not STREAM) and that this value should be the length of the longest record in the file (Appendix A, PDS Standards, last updated February 27, 2009). This document also indicates that all table rows that are less than the fixed record length value should be padded (ususally with nulls).
Definition at line 67 of file ExportPdsTable.h.
Isis::ExportPdsTable::ExportPdsTable | ( | Table | isisTable | ) |
Construct an ExportPdsTable object and set default member variable values.
This constructor sets the following defaults:
isisTable | The Isis3 Table object to be exported. |
Definition at line 53 of file ExportPdsTable.cpp.
References Isis::Table::Records().
Isis::ExportPdsTable::~ExportPdsTable | ( | ) |
Destructs for ExportPdsTable objects.
Definition at line 66 of file ExportPdsTable.cpp.
PvlObject Isis::ExportPdsTable::exportTable | ( | char * | pdsTableBuffer, |
int | outputFileRecordBytes, | ||
QString | pdsTableByteOrder | ||
) |
This methods fills the given buffer with the binary PDS table data and returns label information.
pdsTableBuffer | This buffer will be filled with binary PDS table data. |
pdsFileRecordBytes | The number or RECORD_BYTES in the PDS file. |
pdsByteOrder | A string containing the byte order of the PDS file. Valid values are "LSB" or "MSB". |
Definition at line 82 of file ExportPdsTable.cpp.
References _FILEINFO_, Isis::TableRecord::RecordSize(), and Isis::toString().
Referenced by Isis::ProcessExportPds::ExportTable().
|
private |
Creates a PvlObject to be added to the PDS label with needed TABLE information.
Definition at line 140 of file ExportPdsTable.cpp.
References Isis::PvlContainer::addKeyword(), Isis::TableField::name(), Isis::TableField::size(), Isis::toString(), and Isis::TableField::type().
QString Isis::ExportPdsTable::formatPdsTableName | ( | ) |
Format the PDS table object name using the Isis3 table name.
Definition at line 220 of file ExportPdsTable.cpp.
|
static |
Static method that formats the given Isis3 table name in PDS format.
This method takes the upper camel case Isis table name and returns a PDS table name that is underscore separated, all upper case and with "_TABLE" appended to the end of the name, if not already present.
isisTableName | An QString containing the Isis3 upper camel case table name. |
Definition at line 234 of file ExportPdsTable.cpp.
|
private |
Pack the buffer with data from the table record, swapping bytes if needed.
record | Isis3 TableRecord to be exported |
buffer | Output buffer to be filled with PDS table row data in the appropriate byte order. |
endianSwap | Pointer to EndianSwapper object to swap bytes if the input Isis Table byte order is not the same as the output PDS byte order. |
Definition at line 264 of file ExportPdsTable.cpp.
References _FILEINFO_, Isis::EndianSwapper::Double(), Isis::TableRecord::Fields(), Isis::EndianSwapper::Float(), Isis::EndianSwapper::Int(), Isis::TableField::isDouble(), Isis::TableField::isInteger(), Isis::TableField::isReal(), Isis::TableField::isText(), Isis::TableField::name(), and Isis::TableField::size().
|
private |
Input Isis3 Table object to be exported.
Definition at line 78 of file ExportPdsTable.h.
|
private |
The number of rows in the exported PDS table.
This value is the same as the number of records the Isis3 Table.
Definition at line 79 of file ExportPdsTable.h.
|
private |
The number of bytes per record in the exported PDS file.
Definition at line 82 of file ExportPdsTable.h.
|
private |
A string indicating the byte order of the exported PDS file.
Definition at line 88 of file ExportPdsTable.h.
|
private |
The number of bytes per row in the exported PDS table.
This value is the same as the RecordSize (number of bytes per record) of the Isis3 Table.
Definition at line 84 of file ExportPdsTable.h.