SQLite::Recordset Class Reference

Wrapper class for referenced record sets. More...

#include <SQLiteDB.h>

Collaboration diagram for SQLite::Recordset:
Collaboration graph
[legend]

List of all members.

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 Recordsetoperator= (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

Realsetm_pSet
 Pointer to the actual record set object.

Detailed Description

Wrapper class for referenced record sets.

Definition at line 148 of file SQLiteDB.h.


Constructor & Destructor Documentation

SQLite::Recordset::Recordset ( const Recordset set  )  [inline]

Copy constructor.

Parameters:
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.

Parameters:
pSet Pointer to the actual record set

Definition at line 169 of file SQLiteDB.h.

References AddRef().


Member Function Documentation

int SQLite::Recordset::GetColumnCount (  )  const

Retrieves the number of fields in each record.

Returns:
The number of fields in the wrapped record set

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.

Parameters:
nNum The ordinal of the field
Returns:
The name of the requested 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).

Parameters:
nNum The index of the record to retrieve
Returns:
A wrapper object of the requested record

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.

Returns:
The number of records in the wrapped record 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.

Returns:
true if the actual record set is valid, false if not

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().

virtual const Recordset& SQLite::Recordset::operator= ( const Recordset other  )  [inline, virtual]

Assignment operator.

Parameters:
other The record set wrapper object to copy the data of
Returns:
A reference to this object

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.

Parameters:
pSet The record set object to wrap

Definition at line 221 of file SQLiteDB.h.

References AddRef(), DecRef(), and m_pSet.

Referenced by operator=().


The documentation for this class was generated from the following files:

Generated on Mon Jun 18 12:40:51 2012 for CC PDF Converter by doxygen 1.6.1