#include <SimpleDB.h>
Collaboration diagram for PLearn::Row:
Public Types | |
typedef RowIterator | iterator |
-- Definition of public nested types | |
typedef iterator | const_iterator |
high-class cheating! | |
typedef long | size_type |
number of elements in a row | |
Public Member Functions | |
Row () | |
Row (const Row &r) | |
Row (const Schema *s) | |
Construct an empty row given only a schema. | |
Row (const vector< unsigned char > &raw, const Schema *s) | |
Construct a row given a schema and a full vector of bytes. | |
iterator | begin () |
Container standard STL functions. | |
iterator | end () |
size_type | size () const |
Return the size of a complete row in CHARS! | |
size_type | max_size () const |
bool | empty () const |
const unsigned char * | raw () const |
Return the raw data. | |
unsigned char * | raw () |
const Schema * | getSchema () const |
iterator | operator[] (int fieldNumber) |
iterator | operator[] (string fieldName) |
iterator | bind (const FieldPtr &p) const |
void | sanitize () const |
Private Attributes | |
vector< unsigned char > | rawrow |
const Schema * | schema |
Definition at line 1047 of file SimpleDB.h.
|
high-class cheating!
Definition at line 1052 of file SimpleDB.h. Referenced by PLearn::SDBWithStats::computeStats(), PLearn::AutoSDBVMatrix::getNewRow(), and PLearn::printFieldNames(). |
|
-- Definition of public nested types
Definition at line 1051 of file SimpleDB.h. Referenced by PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), operator[](), PLearn::printFieldName(), and sanitize(). |
|
number of elements in a row
Definition at line 1053 of file SimpleDB.h. |
|
-- We are now in a position to define the Row public interface. This is fairly simple, since a lot of the work is delegated to the iterator. Definition at line 1060 of file SimpleDB.h. |
|
Definition at line 1061 of file SimpleDB.h. |
|
Construct an empty row given only a schema.
Definition at line 781 of file SimpleDB.cc. |
|
Construct a row given a schema and a full vector of bytes. The vector is assumed to be in proper endianness. Definition at line 1068 of file SimpleDB.h. References PLearn::raw. |
|
Container standard STL functions.
Definition at line 1076 of file SimpleDB.h. References PLearn::raw. Referenced by PLearn::SDBWithStats::computeStats(), PLearn::AutoSDBVMatrix::getNewRow(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::operator<<(), operator[](), PLearn::printFieldNames(), and sanitize(). |
|
Bind a FieldPtr to a row to produce a row iterator (this would actually be an opportunity to overload operator->*(), note the star, but use restraint and don't do it). Right now, we define binding a null pointer as an error. Definition at line 1135 of file SimpleDB.h. References PLearn::FieldPtr::field_index_, PLearn::FieldPtr::offset_, PLERROR, and PLearn::raw. Referenced by PLearn::SDBVMFieldSumClaims::convertField(), PLearn::SDBVMFieldHasClaim::convertField(), and PLearn::SDBVMSource::getValue(). |
|
Definition at line 1097 of file SimpleDB.h. |
|
Definition at line 1080 of file SimpleDB.h. References PLearn::raw. Referenced by PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::operator<<(), operator[](), PLearn::printFieldNames(), Row(), and sanitize(). |
|
Definition at line 1116 of file SimpleDB.h. |
|
Definition at line 1093 of file SimpleDB.h. |
|
Definition at line 824 of file SimpleDB.cc. |
|
A few utility operators. Note: contrarily to standard containers, operator[] does not return a reference to a type, but an iterator to the proper position within the row. This is done because of the intrinsic polymorphism of row elements. An iterator equal to end() is returned if the field could be accessed/found. Definition at line 816 of file SimpleDB.cc. |
|
Definition at line 1109 of file SimpleDB.h. |
|
Return the raw data.
Definition at line 1102 of file SimpleDB.h. Referenced by PLearn::SimpleDB< KeyType, QueryResult >::addRow(), PLearn::SimpleDB< KeyType, QueryResult >::findEqualLinear(), PLearn::SimpleDB< KeyType, QueryResult >::getInRow(), PLearn::SimpleDB< KeyType, QueryResult >::indexColumn(), and PLearn::SimpleDB< KeyType, QueryResult >::setRow(). |
|
This should be called to perform some sanity checking on a row before writing it to disk. This function is marked const, but nevertheless makes invisible changes to the object. Definition at line 792 of file SimpleDB.cc. References PLearn::RowIterator::asString(), begin(), end(), iterator, PLearn::RowIterator::precision(), and x. Referenced by PLearn::SimpleDB< KeyType, QueryResult >::addRow(), and PLearn::SimpleDB< KeyType, QueryResult >::setRow(). |
|
Return the size of a complete row in CHARS!
Definition at line 1089 of file SimpleDB.h. Referenced by PLearn::SimpleDB< KeyType, QueryResult >::addRow(), PLearn::SimpleDB< KeyType, QueryResult >::getInRow(), PLearn::SimpleDB< KeyType, QueryResult >::setRow(), and PLearn::SimpleDB< KeyType, QueryResult >::setSchema(). |
|
Definition at line 1150 of file SimpleDB.h. Referenced by Row(). |
|
Definition at line 1151 of file SimpleDB.h. Referenced by operator[](), and Row(). |