Isis 3 Programmer Reference
|
#include <TableRecord.h>
Public Member Functions | |
TableRecord () | |
Constructs an empty TableRecord object. No member variables are set. More... | |
~TableRecord () | |
Destroys the TableRecord object. More... | |
void | operator+= (Isis::TableField &field) |
Adds a TableField to a TableRecord. More... | |
TableField & | operator[] (const int field) |
Returns the TableField at the specified location in the TableRecord. More... | |
TableField & | operator[] (const QString &field) |
Returns the TableField in the record whose name corresponds to the input string. More... | |
int | Fields () const |
Returns the number of fields that are currently in the record. More... | |
int | RecordSize () const |
Returns the number of bytes per record. More... | |
void | Pack (char *buf) const |
Writes record information into the binary buffer. More... | |
void | Unpack (const char *buf) |
Reads record information from the binary buffer. More... | |
void | Swap (char *buf) const |
Swaps bytes of the buffer, depending on the TableField::Type. More... | |
Static Public Member Functions | |
static QString | toString (TableRecord record, QString fieldDelimiter=",", bool fieldNames=false, bool endLine=true) |
Private Attributes | |
std::vector< TableField > | p_fields |
Vector of TableFields in the record. More... | |
2005-03-18 Elizabeth Ribelin - Added documentation to class
2007-05-28 Steven Lambright - Added 4 byte float capablilities.
2008-06-19 Christopher Austin - Fixed the Packing of text TableFields
2008-06-25 Christopher Austin - Fixed the swapping of text
2012-10-04 Jeannie Backer Changed references to TableField methods in implementation and unitTest files to lower camel case. Added and ordered includes. Moved method implementation to cpp. Fixed header definition statement. Fixed indentation of history entries. Ordered methods in cpp file. Improved test coverage in all categories. Added padding to control statements. References #1169.
2015-10-04 Jeannie Backer Improved coding standards. References #1178
Definition at line 54 of file TableRecord.h.
Isis::TableRecord::TableRecord | ( | ) |
Constructs an empty TableRecord object. No member variables are set.
Definition at line 37 of file TableRecord.cpp.
Isis::TableRecord::~TableRecord | ( | ) |
Destroys the TableRecord object.
Definition at line 41 of file TableRecord.cpp.
int Isis::TableRecord::Fields | ( | ) | const |
Returns the number of fields that are currently in the record.
Definition at line 94 of file TableRecord.cpp.
Referenced by Isis::DawnVirCamera::DawnVirCamera(), Isis::ImportPdsTable::extractBinary(), Isis::RosettaVirtisCamera::getPointingTable(), Isis::DawnVirCamera::getPointingTable(), Isis::SpicePosition::LoadCache(), Isis::ExportPdsTable::Pack(), Isis::Table::RecordFields(), Isis::RosettaVirtisCamera::RosettaVirtisCamera(), and Isis::Table::Table().
void Isis::TableRecord::operator+= | ( | Isis::TableField & | field | ) |
Adds a TableField to a TableRecord.
field | - TableField to be added to the record |
Definition at line 50 of file TableRecord.cpp.
Isis::TableField & Isis::TableRecord::operator[] | ( | const int | field | ) |
Returns the TableField at the specified location in the TableRecord.
field | Index of desired field |
Definition at line 61 of file TableRecord.cpp.
TableField & Isis::TableRecord::operator[] | ( | const QString & | field | ) |
Returns the TableField in the record whose name corresponds to the input string.
field | The name of desired TableField |
Isis::IException::Programmer | - The field does not exist in the record |
Definition at line 76 of file TableRecord.cpp.
References _FILEINFO_, and Isis::IString::UpCase().
void Isis::TableRecord::Pack | ( | char * | buf | ) | const |
Writes record information into the binary buffer.
buf | Buffer to fill with binary record information. |
Isis::IException::Programmer | - Invalid field type |
Definition at line 116 of file TableRecord.cpp.
References _FILEINFO_, Isis::TableField::isDouble(), Isis::TableField::isInteger(), Isis::TableField::isReal(), Isis::TableField::isText(), and Isis::TableField::size().
Referenced by Isis::Table::operator+=(), and Isis::Table::Update().
int Isis::TableRecord::RecordSize | ( | ) | const |
Returns the number of bytes per record.
Definition at line 103 of file TableRecord.cpp.
Referenced by Isis::ExportPdsTable::exportTable(), Isis::Table::operator+=(), and Isis::Table::RecordSize().
void Isis::TableRecord::Swap | ( | char * | buf | ) | const |
Swaps bytes of the buffer, depending on the TableField::Type.
buf | Buffer containing record values to be swapped. |
Isis::iException::Programmer | - Invalid field type |
Definition at line 184 of file TableRecord.cpp.
References _FILEINFO_, Isis::TableField::bytes(), Isis::TableField::isDouble(), Isis::TableField::isInteger(), Isis::TableField::isReal(), Isis::TableField::isText(), and Isis::TableField::size().
Referenced by Isis::Table::ReadData().
void Isis::TableRecord::Unpack | ( | const char * | buf | ) |
Reads record information from the binary buffer.
buf | Buffer from which to read record field values. |
Definition at line 168 of file TableRecord.cpp.
References Isis::TableField::bytes().
Referenced by Isis::Table::operator[]().
|
private |
Vector of TableFields in the record.
Definition at line 74 of file TableRecord.h.