SQLite::Record Class Reference

Wrapper class for referenced records. More...

#include <SQLiteDB.h>

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

List of all members.

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

RealRecordm_pRecord
 Pointer to the actual record object.

Detailed Description

Wrapper class for referenced records.

Definition at line 67 of file SQLiteDB.h.


Constructor & Destructor Documentation

SQLite::Record::Record ( const Record record  )  [inline]

Copy constructor.

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

Parameters:
pRecord 

Definition at line 89 of file SQLiteDB.h.

References AddRef().


Member Function Documentation

std::tstring SQLite::Record::GetField ( const std::tstring &  sName  )  const

Retrieves the value of a field of the record (by name).

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

Parameters:
nColumn The ordinal number of the field
Returns:
The contents of the requested 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).

Parameters:
sName The name of the field
Returns:
The numeric contents 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).

Parameters:
nColumn The number of the field
Returns:
The numeric contents 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.

Returns:
true if there's a record, false if not

Definition at line 104 of file SQLiteDB.h.

References m_pRecord.

Referenced by DoLicensePage().

const Record& SQLite::Record::operator= ( const Record other  )  [inline]

Assignment operator.

Parameters:
other The record to assign to this one
Returns:
A reference to this record

Definition at line 132 of file SQLiteDB.h.

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

std::tstring SQLite::Record::operator[] ( const std::tstring &  sName  )  const

Retrieves the value of a field of the record (by name).

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

Parameters:
nColumn The ordinal number of the field
Returns:
The contents of the requested field

Definition at line 301 of file SQLiteDB.cpp.

References SQLite::RealRecord::GetField(), and m_pRecord.


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