Isis 3.0
Back | Home
Isis::TableRecord Class 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...
 
TableFieldoperator[] (const int field)
 Returns the TableField at the specified location in the TableRecord. More...
 
TableFieldoperator[] (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)
 

Detailed Description

Author
2004-09-01 Jeff Anderson

Constructor & Destructor Documentation

Isis::TableRecord::TableRecord ( )

Constructs an empty TableRecord object. No member variables are set.

Isis::TableRecord::~TableRecord ( )

Destroys the TableRecord object.

Member Function Documentation

int Isis::TableRecord::Fields ( ) const

Returns the number of fields that are currently in the record.

Returns
The number of fields in the record

Referenced by Isis::DawnVirCamera::DawnVirCamera(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), Isis::Table::RecordFields(), Isis::Table::Table(), and toString().

void Isis::TableRecord::operator+= ( Isis::TableField field)

Adds a TableField to a TableRecord.

Parameters
field- TableField to be added to the record
Isis::TableField & Isis::TableRecord::operator[] ( const int  field)

Returns the TableField at the specified location in the TableRecord.

Parameters
fieldIndex of desired field
Returns
The TableField at specified location in the record
TableField & Isis::TableRecord::operator[] ( const QString &  field)

Returns the TableField in the record whose name corresponds to the input string.

Parameters
fieldThe name of desired TableField
Returns
The specified TableField
Exceptions
Isis::IException::Programmer- The field does not exist in the record

References _FILEINFO_, and Isis::IString::UpCase().

void Isis::TableRecord::Pack ( char *  buf) const

Writes record information into the binary buffer.

Parameters
bufBuffer to fill with binary record information.
Exceptions
Isis::IException::Programmer- Invalid field type

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.

Returns
Number of bytes per record

Referenced by Isis::ExportPdsTable::exportTable(), Isis::Table::operator+=(), Isis::Table::RecordSize(), and Isis::ProcessMosaic::SetMosaicOrigin().

void Isis::TableRecord::Swap ( char *  buf) const

Swaps bytes of the buffer, depending on the TableField::Type.

Parameters
bufBuffer containing record values to be swapped.
Exceptions
Isis::iException::Programmer- Invalid field type

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().

QString Isis::TableRecord::toString ( TableRecord  record,
QString  fieldDelimiter = ",",
bool  fieldNames = false,
bool  endLine = true 
)
static

References Fields(), and Isis::toString().

Referenced by Isis::Table::toString().

void Isis::TableRecord::Unpack ( const char *  buf)

Reads record information from the binary buffer.

Parameters
bufBuffer from which to read record field values.

References Isis::TableField::bytes().

Referenced by Isis::Table::operator[]().


The documentation for this class was generated from the following files:

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:46:43