#include <SimpleDB.h>
Collaboration diagram for PLearn::RowIterator:
Public Member Functions | |
RowIterator () | |
-- Requirements from trivial iterator | |
RowIterator (const RowIterator &x) | |
bool | operator== (const RowIterator &x) |
bool | operator!= (const RowIterator &x) |
RowIterator (int curf, unsigned char *curp, const Schema *sc) | |
Non-trivial ctor. | |
RowIterator & | operator= (const RowIterator &x) |
Default destructor is being used Assignment. | |
void | copyFrom (const RowIterator &it) |
Copying of value. | |
FieldRowRef | operator * () const |
Dereference. | |
RowIterator & | operator++ () |
-- Requirements from input iterator | |
RowIterator | operator++ (int) |
Post-increment is expressed as a pre-increment. | |
RowIterator | operator[] (int i) |
Permit limited random access from an iterator (positive directions only!). | |
FieldType | getFieldType () const |
bool | isString () const |
-- Predicates to test whether current element is of a certain type. | |
bool | isCharacter () const |
bool | isSignedChar () const |
bool | isShort () const |
bool | isInt () const |
bool | isFloat () const |
bool | isDouble () const |
bool | isDate () const |
char * | asString () |
unsigned char * | asCharacter () |
signed char * | asSignedChar () |
short * | asShort () |
int * | asInt () |
float * | asFloat () |
double * | asDouble () |
PDate * | asDate () |
const char * | asString () const |
const unsigned char * | asCharacter () const |
const signed char * | asSignedChar () const |
const short * | asShort () const |
const int * | asInt () const |
const float * | asFloat () const |
const double * | asDouble () const |
const PDate * | asDate () const |
double | toDouble () const |
-- GENERIC CONVERSIONS. | |
string | toString () const |
bool | isMissing () const |
-- The following functions deal with missing values | |
void | setMissing () |
string | name () const |
Return the name of the current field, or "" if not currently pointing to any valid field. | |
int | precision () const |
Return the precision of the current field (number of bytes), or -1 if not currently pointing to any valid field. | |
int | char_width () const |
Return the size in characters required to print out the current field. | |
unsigned char * | raw () |
Return the physical address of the iterator. | |
const unsigned char * | raw () const |
FieldPtr | makePtr () const |
Private Attributes | |
unsigned | curfield |
current field number in schema | |
unsigned char * | curptr |
current ptr in rawrow | |
const Schema * | schema |
|
-- Requirements from trivial iterator
Definition at line 745 of file SimpleDB.h. |
|
Definition at line 746 of file SimpleDB.h. References x. |
|
Non-trivial ctor.
Definition at line 762 of file SimpleDB.h. |
|
Definition at line 927 of file SimpleDB.h. |
|
Definition at line 886 of file SimpleDB.h. Referenced by PLearn::AutoSDBVMatrix::getNewRow(), isMissing(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), setMissing(), toDouble(), and toString(). |
|
Definition at line 953 of file SimpleDB.h. |
|
Definition at line 912 of file SimpleDB.h. Referenced by isMissing(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), setMissing(), toDouble(), and toString(). |
|
Definition at line 949 of file SimpleDB.h. |
|
Definition at line 908 of file SimpleDB.h. Referenced by isMissing(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), setMissing(), toDouble(), and toString(). |
|
Definition at line 945 of file SimpleDB.h. |
|
Definition at line 904 of file SimpleDB.h. Referenced by isMissing(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), setMissing(), toDouble(), and toString(). |
|
Definition at line 941 of file SimpleDB.h. |
|
Definition at line 900 of file SimpleDB.h. Referenced by isMissing(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), setMissing(), toDouble(), and toString(). |
|
Definition at line 937 of file SimpleDB.h. |
|
Definition at line 896 of file SimpleDB.h. Referenced by isMissing(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), setMissing(), toDouble(), and toString(). |
|
Definition at line 932 of file SimpleDB.h. |
|
Definition at line 891 of file SimpleDB.h. Referenced by isMissing(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), setMissing(), toDouble(), and toString(). |
|
-- CONST VERSIONS. Return a pointer to the CURRENT element, as the correct type. Return 0 element if the wrong type is specified. The current element may be modified through this pointer. Definition at line 923 of file SimpleDB.h. |
|
-- Return a pointer to the CURRENT element, as the correct type. Return 0 element if the wrong type is specified. The current element may be modified through this pointer. Definition at line 877 of file SimpleDB.h. Referenced by PLearn::AutoSDBVMatrix::getNewRow(), isMissing(), PLearn::FieldRowRef::operator FieldValue(), PLearn::operator<<(), PLearn::FieldRowRef::operator=(), PLearn::Row::sanitize(), setMissing(), toDouble(), and toString(). |
|
Return the size in characters required to print out the current field.
Definition at line 602 of file SimpleDB.cc. References c_str(), curfield, isCharacter(), isDate(), isDouble(), isFloat(), isInt(), isShort(), isSignedChar(), isString(), name(), PLERROR, and precision(). Referenced by PLearn::operator<<(), and PLearn::printFieldName(). |
|
Copying of value.
Definition at line 781 of file SimpleDB.h. References std::copy(), getFieldType(), PLERROR, precision(), PLearn::raw, and raw(). |
|
Definition at line 825 of file SimpleDB.h. References PLearn::FieldType. Referenced by PLearn::SDBWithStats::computeStats(), and copyFrom(). |
|
Definition at line 836 of file SimpleDB.h. References PLearn::CharacterType. Referenced by char_width(), and PLearn::AutoSDBVMatrix::getNewRow(). |
|
Definition at line 866 of file SimpleDB.h. References PLearn::DateType. Referenced by char_width(). |
|
Definition at line 861 of file SimpleDB.h. References PLearn::DoubleType. Referenced by char_width(). |
|
Definition at line 856 of file SimpleDB.h. References PLearn::FloatType. Referenced by char_width(). |
|
Definition at line 851 of file SimpleDB.h. References PLearn::IntType. Referenced by char_width(). |
|
-- The following functions deal with missing values
Definition at line 560 of file SimpleDB.cc. References asCharacter(), asDate(), asDouble(), asFloat(), asInt(), asShort(), asSignedChar(), asString(), PLearn::MissingCharacter, PLearn::MissingDate, PLearn::MissingInt, PLearn::MissingShort, PLearn::MissingSignedChar, PLearn::MissingString, and x. Referenced by PLearn::SDBWithStats::computeStats(), PLearn::AutoSDBVMatrix::getNewRow(), PLearn::operator<<(), toDouble(), and toString(). |
|
Definition at line 846 of file SimpleDB.h. References PLearn::ShortType. Referenced by char_width(). |
|
Definition at line 841 of file SimpleDB.h. References PLearn::SignedCharType. Referenced by char_width(). |
|
-- Predicates to test whether current element is of a certain type. Always false for null or past-end iterators. Definition at line 831 of file SimpleDB.h. References PLearn::StringType. Referenced by char_width(), and PLearn::AutoSDBVMatrix::getNewRow(). |
|
Make a FieldPtr from the current iterator position (this operation is not extremely fast, since we must loop from the beginning of the row) Definition at line 1000 of file SimpleDB.h. References PLearn::Schema::findColumn(). |
|
Return the name of the current field, or "" if not currently pointing to any valid field.
Definition at line 971 of file SimpleDB.h. Referenced by char_width(), PLearn::AutoSDBVMatrix::getNewRow(), and PLearn::printFieldName(). |
|
Dereference.
Definition at line 1192 of file SimpleDB.h. |
|
Definition at line 757 of file SimpleDB.h. References x. |
|
Post-increment is expressed as a pre-increment.
Definition at line 809 of file SimpleDB.h. References x. |
|
-- Requirements from input iterator Preincrement : the distance of the increment depends on the current field size. And end() iterator has a current field number that is 1 beyond the maximum number of field. A null iterator has everything equal to zero. Definition at line 800 of file SimpleDB.h. |
|
Default destructor is being used Assignment.
Definition at line 769 of file SimpleDB.h. References x. |
|
Definition at line 751 of file SimpleDB.h. References x. |
|
Permit limited random access from an iterator (positive directions only!).
Definition at line 817 of file SimpleDB.h. |
|
Return the precision of the current field (number of bytes), or -1 if not currently pointing to any valid field.
Definition at line 978 of file SimpleDB.h. Referenced by char_width(), copyFrom(), PLearn::FieldRowRef::operator=(), and PLearn::Row::sanitize(). |
|
Definition at line 992 of file SimpleDB.h. |
|
Return the physical address of the iterator.
Definition at line 988 of file SimpleDB.h. Referenced by copyFrom(). |
|
Definition at line 582 of file SimpleDB.cc. References asCharacter(), asDate(), asDouble(), asFloat(), asInt(), asShort(), asSignedChar(), asString(), PLearn::MissingCharacter, PLearn::MissingDate, PLearn::MissingDouble, PLearn::MissingFloat, PLearn::MissingInt, PLearn::MissingShort, PLearn::MissingSignedChar, PLearn::MissingString, and x. |
|
-- GENERIC CONVERSIONS. To string and to double, from nearly any type of field Definition at line 627 of file SimpleDB.cc. References asCharacter(), asDate(), asDouble(), asFloat(), asInt(), asShort(), asSignedChar(), asString(), PLearn::date_to_float(), isMissing(), MISSING_VALUE, PLERROR, and x. Referenced by PLearn::AutoSDBVMatrix::getNewRow(), and PLearn::todouble(). |
|
Definition at line 650 of file SimpleDB.cc. References asCharacter(), asDate(), asDouble(), asFloat(), asInt(), asShort(), asSignedChar(), asString(), isMissing(), PLearn::space_to_underscore(), PLearn::tostring(), and x. Referenced by PLearn::tostring(). |
|
current field number in schema
Definition at line 1005 of file SimpleDB.h. Referenced by char_width(). |
|
current ptr in rawrow
Definition at line 1006 of file SimpleDB.h. |
|
Definition at line 1007 of file SimpleDB.h. |