Wrapper class for referenced records. More...
#include <SQLiteDB.h>
Public Member Functions | |
Record () | |
Default constructor. | |
Record (const Record &record) | |
Copy constructor. | |
virtual | ~Record () |
Destructor; will delete the record if this is the last reference. | |
bool | IsValid () const |
Tests if this object points to an actual record. | |
std::tstring | operator[] (int nColumn) const |
Retrieves the value of a field of the record (by order). | |
std::tstring | operator[] (const std::tstring &sName) const |
Retrieves the value of a field of the record (by name). | |
std::tstring | GetField (int nColumn) const |
Retrieves the value of a field of the record (by order). | |
std::tstring | GetField (const std::tstring &sName) const |
Retrieves the value of a field of the record (by name). | |
int | GetNumField (int nColumn) const |
Retrieves the value of a numeric field of the record (by order). | |
int | GetNumField (const std::tstring &sName) const |
Retrieves the value of a numeric field of the record (by name). | |
const Record & | operator= (const Record &other) |
Assignment operator. | |
Protected Member Functions | |
Record (RealRecord *pRecord) | |
Constructor from an actual record object. | |
void | AddRef () const |
Adds a reference to the actual record object. | |
void | DecRef () const |
Removes a reference to the actual record object (can delete the object). | |
Protected Attributes | |
RealRecord * | m_pRecord |
Pointer to the actual record object. |
Wrapper class for referenced records.
Definition at line 67 of file SQLiteDB.h.
SQLite::Record::Record | ( | const Record & | record | ) | [inline] |
Copy constructor.
record | The record wrapper to copy |
Definition at line 79 of file SQLiteDB.h.
References AddRef().
SQLite::Record::Record | ( | RealRecord * | pRecord | ) | [inline, protected] |
Constructor from an actual record object.
pRecord |
Definition at line 89 of file SQLiteDB.h.
References AddRef().
std::tstring SQLite::Record::GetField | ( | const std::tstring & | sName | ) | const |
Retrieves the value of a field of the record (by name).
sName | The name of the field |
Definition at line 328 of file SQLiteDB.cpp.
References SQLite::RealRecord::GetField(), and m_pRecord.
std::tstring SQLite::Record::GetField | ( | int | nColumn | ) | const |
Retrieves the value of a field of the record (by order).
nColumn | The ordinal number of the field |
Definition at line 319 of file SQLiteDB.cpp.
References SQLite::RealRecord::GetField(), and m_pRecord.
Referenced by DoLicensePage(), and GetNumField().
int SQLite::Record::GetNumField | ( | const std::tstring & | sName | ) | const [inline] |
Retrieves the value of a numeric field of the record (by name).
sName | The name of the field |
Definition at line 125 of file SQLiteDB.h.
References GetField().
int SQLite::Record::GetNumField | ( | int | nColumn | ) | const [inline] |
Retrieves the value of a numeric field of the record (by order).
nColumn | The number of the field |
Definition at line 119 of file SQLiteDB.h.
References GetField().
Referenced by DoLicensePage().
bool SQLite::Record::IsValid | ( | ) | const [inline] |
Tests if this object points to an actual record.
Definition at line 104 of file SQLiteDB.h.
References m_pRecord.
Referenced by DoLicensePage().
Assignment operator.
other | The record to assign to this one |
Definition at line 132 of file SQLiteDB.h.
std::tstring SQLite::Record::operator[] | ( | const std::tstring & | sName | ) | const |
Retrieves the value of a field of the record (by name).
sName | The name of the field |
Definition at line 310 of file SQLiteDB.cpp.
References SQLite::RealRecord::GetField(), and m_pRecord.
std::tstring SQLite::Record::operator[] | ( | int | nColumn | ) | const |
Retrieves the value of a field of the record (by order).
nColumn | The ordinal number of the field |
Definition at line 301 of file SQLiteDB.cpp.
References SQLite::RealRecord::GetField(), and m_pRecord.