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

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

#include <data.hpp>

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

List of all members.

Public Member Functions

 STLSharedSetContainer (const boost::shared_ptr< T > &x)
 STLSharedSetContainer ()
void init () const

Public Attributes

boost::shared_ptr< T > data
 Shared pointer to the STL container.

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

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

Detailed Description

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

Wraps a SetContainer object around a shared pointer 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 663 of file data.hpp.


Constructor & Destructor Documentation

template<class T >
ASql::Data::STLSharedSetContainer< T >::STLSharedSetContainer ( const boost::shared_ptr< T > &  x) [inline]

Definition at line 684 of file data.hpp.

template<class T >
ASql::Data::STLSharedSetContainer< T >::STLSharedSetContainer ( ) [inline]

Definition at line 685 of file data.hpp.


Member Function Documentation

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

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

Implements ASql::Data::SetContainer.

Definition at line 668 of file data.hpp.

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

template<class T >
const Set* ASql::Data::STLSharedSetContainer< 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 675 of file data.hpp.

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

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

Pop a row off the end of the container.

Implements ASql::Data::SetContainer.

Definition at line 674 of file data.hpp.

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


Member Data Documentation

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

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