USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::TableRecord Class Reference
[Low Level Cube I/O]

#include <TableRecord.h>

Collaboration diagram for Isis::TableRecord:

Collaboration graph
[legend]
List of all members.

Detailed Description

Author:
2004-09-01 Jeff Anderson

For internal use only.

History:
2005-03-18 Elizabeth Ribelin - Added documentation to class
History:
2007-05-28 Steven Lambright - Added 4 byte float capablilities.
History:
2008-06-19 Christopher Austin - Fixed the Packing of text TableFields
History:
2008-06-25 Christopher Austin - Fixed the swapping of text
Todo:
Finish class documentation

Definition at line 47 of file TableRecord.h.

Public Member Functions

 TableRecord ()
 Constructs a TableRecord object.
 ~TableRecord ()
 Destroys the TableRecord object.
int Fields () const
 Returns the number of fields that are in the record.
void operator+= (Isis::TableField &field)
 Adds a TableField to a TableRecord.
int RecordSize () const
 Returns the number of bytes per record.
Isis::TableFieldoperator[] (const int field)
 Returns the TableField at the specified location in the TableRecord.
Isis::TableFieldoperator[] (const std::string &field)
 Returns the TableField in the record whose name corresponds to the input string.
void Pack (char *buf) const
void Unpack (const char *buf)
void Swap (char *buf) const

Private Attributes

std::vector< Isis::TableFieldp_fields
 Vector of TableFields in the record.


Constructor & Destructor Documentation

Isis::TableRecord::TableRecord (  )  [inline]

Constructs a TableRecord object.

Definition at line 50 of file TableRecord.h.

Isis::TableRecord::~TableRecord (  )  [inline]

Destroys the TableRecord object.

Definition at line 53 of file TableRecord.h.


Member Function Documentation

int Isis::TableRecord::Fields (  )  const [inline]

Returns the number of fields that are in the record.

Returns:
The number of fields in the record

Definition at line 60 of file TableRecord.h.

References p_fields.

Referenced by Pack(), Swap(), Isis::Table::Table(), and Unpack().

void Isis::TableRecord::operator+= ( Isis::TableField field  )  [inline]

Adds a TableField to a TableRecord.

Parameters:
field - TableField to be added to the record

Definition at line 67 of file TableRecord.h.

References field, and p_fields.

Isis::TableField & Isis::TableRecord::operator[] ( const std::string &  field  ) 

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

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

Definition at line 53 of file TableRecord.cpp.

References _FILEINFO_, Isis::iException::Message(), p_fields, and Isis::iString::UpCase().

Isis::TableField& Isis::TableRecord::operator[] ( const int  field  )  [inline]

Returns the TableField at the specified location in the TableRecord.

Parameters:
field Index of desired field
Returns:
The TableField at specified location in the record

Definition at line 78 of file TableRecord.h.

References p_fields.

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

Parameters:
buf 
Exceptions:
Isis::iException::Programmer - Invalid field type

Definition at line 73 of file TableRecord.cpp.

References _FILEINFO_, field, Fields(), Isis::iException::Message(), and p_fields.

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

Definition at line 36 of file TableRecord.cpp.

References p_fields.

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

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

Parameters:
buf 
Exceptions:
Isis::iException::Programmer - Invalid field type

Definition at line 141 of file TableRecord.cpp.

References _FILEINFO_, field, Fields(), Isis::iException::Message(), and p_fields.

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

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

Parameters:
buf 

Definition at line 125 of file TableRecord.cpp.

References field, Fields(), and p_fields.

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


Member Data Documentation

std::vector<Isis::TableField> Isis::TableRecord::p_fields [private]

Vector of TableFields in the record.

Definition at line 87 of file TableRecord.h.

Referenced by Fields(), operator+=(), operator[](), Pack(), RecordSize(), Swap(), and Unpack().


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