Public Types | Public Member Functions | Private Attributes

LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR > Class Template Reference

This can be used to delegate calls to a member of the given CELL -- useful if your CELL contains multiple collections, e.g. More...

#include <collectioninterface.h>

Collaboration diagram for LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef CONTAINER::value_type Cargo
typedef ITERATOR Iterator
typedef CONST_ITERATOR ConstIterator

Public Member Functions

 Delegate (CONTAINER CELL::*memberPointer)
ITERATOR begin (CELL &cell) const
CONST_ITERATOR begin (const CELL &cell) const
ITERATOR end (CELL &cell) const
CONST_ITERATOR end (const CELL &cell) const
std::size_t size (const CELL &cell) const

Private Attributes

CONTAINER CELL::* memberPointer

Detailed Description

template<typename CELL, typename CONTAINER, typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
class LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >

This can be used to delegate calls to a member of the given CELL -- useful if your CELL contains multiple collections, e.g.

particles of different type, or nodes and elements.

This is not unlike the Selector class template, which we use to select single member variables.


Member Typedef Documentation

template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
typedef CONTAINER::value_type LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::Cargo
template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
typedef CONST_ITERATOR LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::ConstIterator
template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
typedef ITERATOR LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::Iterator

Constructor & Destructor Documentation

template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::Delegate ( CONTAINER CELL::*  memberPointer  )  [inline, explicit]

Member Function Documentation

template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
ITERATOR LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::begin ( CELL &  cell  )  const [inline]
template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
CONST_ITERATOR LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::begin ( const CELL &  cell  )  const [inline]
template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
CONST_ITERATOR LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::end ( const CELL &  cell  )  const [inline]
template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
ITERATOR LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::end ( CELL &  cell  )  const [inline]
template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
std::size_t LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::size ( const CELL &  cell  )  const [inline]

Member Data Documentation

template<typename CELL , typename CONTAINER , typename ITERATOR = typename CONTAINER::iterator, typename CONST_ITERATOR = typename CONTAINER::const_iterator>
CONTAINER CELL::* LibGeoDecomp::CollectionInterface::Delegate< CELL, CONTAINER, ITERATOR, CONST_ITERATOR >::memberPointer [private]

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