Public Member Functions | Private Member Functions | Private Attributes

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

Wraps a Set object around a pointer to a dataset of type T. More...

#include <asql.hpp>

Inheritance diagram for ASql::Data::SetPtrBuilder< T >:
ASql::Data::Set

List of all members.

Public Member Functions

 SetPtrBuilder ()
 Default constructor set's the pointer to null.
 SetPtrBuilder (const T &x)
 Set the pointer to the address of the object referenced to by x.
 SetPtrBuilder (SetPtrBuilder &x)
void set (const T &data)
 Set the pointer to the address of the object referenced to by x.
void clear ()
 Set the pointer to null.
 operator bool () const
 Return true if the pointer is not null.

Private Member Functions

virtual size_t numberOfSqlElements () const
 Wrapper function for the numberOfSqlElements() function in the data object.
virtual Index getSqlIndex (const size_t index) const
 Wrapper function for the getSqlIndex() function in the data object.

Private Attributes

const T * m_data
 Pointer to the dataset.

Detailed Description

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

Wraps a Set object around a pointer to a dataset of type T.

This has the one advantage over SetRefBuilder in that the dataset pointed to can be changed with destroying/rebuilding wrapper object.

Template Parameters:
Tobject type to point to. Must have numberOfSqlElements() and getSqlIndex() function defined as per the instruction in Data::Set.

Definition at line 415 of file asql.hpp.


Constructor & Destructor Documentation

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

Default constructor set's the pointer to null.

Definition at line 433 of file asql.hpp.

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

Set the pointer to the address of the object referenced to by x.

Definition at line 437 of file asql.hpp.

template<class T>
ASql::Data::SetPtrBuilder< T >::SetPtrBuilder ( SetPtrBuilder< T > &  x ) [inline]

Definition at line 438 of file asql.hpp.


Member Function Documentation

template<class T>
void ASql::Data::SetPtrBuilder< T >::clear (  ) [inline]

Set the pointer to null.

Definition at line 446 of file asql.hpp.

template<class T>
virtual Index ASql::Data::SetPtrBuilder< T >::getSqlIndex ( const size_t  index ) const [inline, private, virtual]

Wrapper function for the getSqlIndex() function in the data object.

Implements ASql::Data::Set.

Definition at line 428 of file asql.hpp.

template<class T>
virtual size_t ASql::Data::SetPtrBuilder< T >::numberOfSqlElements (  ) const [inline, private, virtual]

Wrapper function for the numberOfSqlElements() function in the data object.

Implements ASql::Data::Set.

Definition at line 424 of file asql.hpp.

template<class T>
ASql::Data::SetPtrBuilder< T >::operator bool (  ) const [inline]

Return true if the pointer is not null.

Definition at line 450 of file asql.hpp.

template<class T>
void ASql::Data::SetPtrBuilder< T >::set ( const T &  data ) [inline]

Member Data Documentation

template<class T>
const T* ASql::Data::SetPtrBuilder< T >::m_data [private]

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