Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

ASql::Data::STLSetContainer< T > Class Template Reference

Wraps a SetContainer object around a new auto-allocated STL container of type T. More...

#include <asql.hpp>

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

List of all members.

Public Member Functions

 STLSetContainer ()

Public Attributes

data
 STL container object of type T that the SetContainer is wrapped around. This is your object.

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::STLSetContainer< T >

Wraps a SetContainer object around a new auto-allocated 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 564 of file asql.hpp.


Constructor & Destructor Documentation

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

Definition at line 586 of file asql.hpp.


Member Function Documentation

template<class T >
Set& ASql::Data::STLSetContainer< T >::manufacture (  ) [inline, private, virtual]

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

Implements ASql::Data::SetContainer.

Definition at line 569 of file asql.hpp.

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

template<class T >
const Set* ASql::Data::STLSetContainer< 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 576 of file asql.hpp.

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

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

Pop a row off the end of the container.

Implements ASql::Data::SetContainer.

Definition at line 575 of file asql.hpp.

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


Member Data Documentation

template<class T >
T ASql::Data::STLSetContainer< T >::data

STL container object of type T that the SetContainer is wrapped around. This is your object.

Definition at line 585 of file asql.hpp.

Referenced by ASql::Data::STLSetContainer< T >::manufacture(), and ASql::Data::STLSetContainer< T >::trim().

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

Definition at line 567 of file asql.hpp.

Referenced by ASql::Data::STLSetContainer< T >::pull().


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