Wrapper class for referenced record sets. More...
#include <SQLiteDB.h>
Public Member Functions | |
Recordset () | |
Default constructor. | |
Recordset (const Recordset &set) | |
Copy constructor. | |
virtual | ~Recordset () |
Destructor. | |
bool | IsValid () const |
Tests if this record set wrapper actually points to a record set. | |
Record | GetRecord (int nNum) const |
Retreives a record (by order). | |
int | GetRecordCount () const |
Retrieves the number of records in the set. | |
int | GetColumnCount () const |
Retrieves the number of fields in each record. | |
std::tstring | GetColumnName (int nNum) const |
Retrieves the name of a field in the set. | |
void | clear () |
Disconnects the wrapper from the actual record set. | |
virtual const Recordset & | operator= (const Recordset &other) |
Assignment operator. | |
Protected Member Functions | |
Recordset (Realset *pSet) | |
Constructor from an actual record set object. | |
void | AddRef () const |
Adds a reference to the actual record set object. | |
void | DecRef () const |
Deletes a reference to the actual record set object (can delete the object). | |
void | SetRealset (Realset *pSet) |
Sets the wrapped actual record set object. | |
Protected Attributes | |
Realset * | m_pSet |
Pointer to the actual record set object. |
Wrapper class for referenced record sets.
Definition at line 148 of file SQLiteDB.h.
SQLite::Recordset::Recordset | ( | const Recordset & | set | ) | [inline] |
Copy constructor.
set | The record set wrapper to copy |
Definition at line 159 of file SQLiteDB.h.
References AddRef().
SQLite::Recordset::Recordset | ( | Realset * | pSet | ) | [inline, protected] |
Constructor from an actual record set object.
pSet | Pointer to the actual record set |
Definition at line 169 of file SQLiteDB.h.
References AddRef().
int SQLite::Recordset::GetColumnCount | ( | ) | const |
Retrieves the number of fields in each record.
Definition at line 257 of file SQLiteDB.cpp.
References SQLite::Realset::GetColumnCount(), IsValid(), and m_pSet.
std::tstring SQLite::Recordset::GetColumnName | ( | int | nNum | ) | const |
Retrieves the name of a field in the set.
nNum | The ordinal of the field |
Definition at line 269 of file SQLiteDB.cpp.
References SQLite::Realset::GetColumnName(), IsValid(), and m_pSet.
Record SQLite::Recordset::GetRecord | ( | int | nNum | ) | const |
Retreives a record (by order).
nNum | The index of the record to retrieve |
Definition at line 207 of file SQLiteDB.cpp.
References SQLite::Realset::GetRecord(), IsValid(), and m_pSet.
Referenced by DoLicensePage().
int SQLite::Recordset::GetRecordCount | ( | ) | const |
Retrieves the number of records in the set.
Definition at line 228 of file SQLiteDB.cpp.
References SQLite::Realset::GetRecordCount(), IsValid(), and m_pSet.
Referenced by DoLicensePage().
bool SQLite::Recordset::IsValid | ( | ) | const |
Tests if this record set wrapper actually points to a record set.
Definition at line 220 of file SQLiteDB.cpp.
References SQLite::Realset::IsValid(), and m_pSet.
Referenced by DoLicensePage(), GetColumnCount(), GetColumnName(), GetRecord(), GetRecordCount(), and SQLite::RealTransaction::Query().
Assignment operator.
other | The record set wrapper object to copy the data of |
Definition at line 208 of file SQLiteDB.h.
References m_pSet, and SetRealset().
void SQLite::Recordset::SetRealset | ( | Realset * | pSet | ) | [inline, protected] |
Sets the wrapped actual record set object.
pSet | The record set object to wrap |
Definition at line 221 of file SQLiteDB.h.
References AddRef(), DecRef(), and m_pSet.
Referenced by operator=().