fastcgi++
Public Member Functions | Private Member Functions | Private Attributes
ASql::Data::STLSetRefContainer< T > Class Template Reference

Wraps a SetContainer object around a reference to an STL container of type T. More...

#include <data.hpp>

Inheritance diagram for ASql::Data::STLSetRefContainer< T >:
ASql::Data::SetContainer

List of all members.

Public Member Functions

void init () const
 STLSetRefContainer (T &x)

Private Member Functions

Setmanufacture ()
 Appends a row to the container and returns a reference to it.
void trim ()
 Pop a row off the end of the container.
const Setpull () const
 Get a row from the front and move on to the next row.

Private Attributes

T & data
SetPtrBuilder< typename
T::value_type > 
m_buffer
T::iterator m_itBuffer

Detailed Description

template<class T>
class ASql::Data::STLSetRefContainer< T >

Wraps a SetContainer object around a reference to an STL container of type T.

This class defines a basic container for types that can be wrapped by the Set class. It is intended for retrieving multi-row results from SQL queries. In order to function the passed container type must have the following member functions push_back(), back(), pop_back() and it's content type must be wrappable by Set as per the instructions there.

Template Parameters:
Containertype. Must be sequential.

Definition at line 626 of file data.hpp.


Constructor & Destructor Documentation

template<class T >
ASql::Data::STLSetRefContainer< T >::STLSetRefContainer ( T &  x) [inline]
Parameters:
xReference to the STL container of type T to reference to.

Definition at line 650 of file data.hpp.


Member Function Documentation

template<class T >
void ASql::Data::STLSetRefContainer< T >::init ( ) const [inline, virtual]
template<class T >
Set& ASql::Data::STLSetRefContainer< T >::manufacture ( ) [inline, private, virtual]

Appends a row to the container and returns a reference to it.

Implements ASql::Data::SetContainer.

Definition at line 632 of file data.hpp.

References ASql::Data::STLSetRefContainer< T >::data, ASql::Data::STLSetRefContainer< T >::m_buffer, and ASql::Data::SetPtrBuilder< T >::set().

template<class T >
const Set* ASql::Data::STLSetRefContainer< T >::pull ( ) const [inline, private, virtual]

Get a row from the front and move on to the next row.

Returns:
This function should return a pointer to the row or null if at the end.

Implements ASql::Data::SetContainer.

Definition at line 639 of file data.hpp.

References ASql::Data::STLSetRefContainer< T >::data, ASql::Data::STLSetRefContainer< T >::m_buffer, ASql::Data::STLSetRefContainer< T >::m_itBuffer, and ASql::Data::SetPtrBuilder< T >::set().

template<class T >
void ASql::Data::STLSetRefContainer< T >::trim ( ) [inline, private, virtual]

Pop a row off the end of the container.

Implements ASql::Data::SetContainer.

Definition at line 638 of file data.hpp.

References ASql::Data::STLSetRefContainer< T >::data.


Member Data Documentation

template<class T >
T& ASql::Data::STLSetRefContainer< T >::data [private]
template<class T >
SetPtrBuilder<typename T::value_type> ASql::Data::STLSetRefContainer< T >::m_buffer [mutable, private]
template<class T >
T::iterator ASql::Data::STLSetRefContainer< T >::m_itBuffer [mutable, private]

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