Isis 3 Programmer Reference
TableRecord.h
Go to the documentation of this file.
1 #ifndef TableRecord_h
2 #define TableRecord_h
3 
26 #include <vector>
27 #include "TableField.h"
28 
29 namespace Isis {
54  class TableRecord {
55  public:
56  TableRecord();
57  ~TableRecord();
58 
59 
60  static QString toString(TableRecord record, QString fieldDelimiter = ",", bool fieldNames = false, bool endLine = true);
61 
62  void operator+=(Isis::TableField &field);
63  TableField&operator [](const int field);
64  TableField &operator[](const QString &field);
65 
66  int Fields() const;
67  int RecordSize() const;
68 
69  void Pack(char *buf) const;
70  void Unpack(const char *buf);
71  void Swap(char *buf) const;
72 
73  private:
74  std::vector<TableField> p_fields;
76  };
77 };
78 
79 #endif
int RecordSize() const
Returns the number of bytes per record.
TableRecord()
Constructs an empty TableRecord object. No member variables are set.
Definition: TableRecord.cpp:37
void Unpack(const char *buf)
Reads record information from the binary buffer.
void operator+=(Isis::TableField &field)
Adds a TableField to a TableRecord.
Definition: TableRecord.cpp:50
void Pack(char *buf) const
Writes record information into the binary buffer.
void Swap(char *buf) const
Swaps bytes of the buffer, depending on the TableField::Type.
TableField & operator[](const int field)
Returns the TableField at the specified location in the TableRecord.
Definition: TableRecord.cpp:61
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
~TableRecord()
Destroys the TableRecord object.
Definition: TableRecord.cpp:41
int Fields() const
Returns the number of fields that are currently in the record.
Definition: TableRecord.cpp:94
std::vector< TableField > p_fields
Vector of TableFields in the record.
Definition: TableRecord.h:74
Class for storing an Isis::Table&#39;s field information.
Definition: TableField.h:63