ViennaGrid - The Vienna Grid Library  2.1.0
Public Types | Public Member Functions | Protected Attributes
dense_container_accessor< ContainerType, AccessType, UnpackT > Class Template Reference

Implementation of an accessor for dense containers (most importantly std::vector, std::deque) which fulfills the accessor concept. More...

#include <accessor.hpp>

Public Types

typedef AccessType access_type
typedef
ContainerType::const_pointer 
const_pointer
typedef
ContainerType::const_reference 
const_reference
typedef ContainerType container_type
typedef
access_type::id_type::base_id_type 
offset_type
typedef ContainerType::pointer pointer
typedef ContainerType::reference reference
typedef ContainerType::value_type value_type

Public Member Functions

reference at (AccessType const &element)
const_reference at (AccessType const &element) const
 dense_container_accessor ()
 dense_container_accessor (ContainerType &container_)
pointer find (AccessType const &element)
const_pointer find (AccessType const &element) const
bool is_valid () const
reference operator() (AccessType const &element)
const_reference operator() (AccessType const &element) const

Protected Attributes

ContainerType * container
UnpackT unpack

Detailed Description

template<typename ContainerType, typename AccessType, typename UnpackT = base_id_unpack>
class viennagrid::dense_container_accessor< ContainerType, AccessType, UnpackT >

Implementation of an accessor for dense containers (most importantly std::vector, std::deque) which fulfills the accessor concept.

Template Parameters:
ContainerTypeThe underlying container type (e.g. std::vector<>)
AccessTypeThe element from which data should be accessed

Member Typedef Documentation

typedef AccessType access_type
typedef ContainerType::const_pointer const_pointer
typedef ContainerType::const_reference const_reference
typedef ContainerType container_type
typedef access_type::id_type::base_id_type offset_type
typedef ContainerType::pointer pointer
typedef ContainerType::reference reference
typedef ContainerType::value_type value_type

Constructor & Destructor Documentation

dense_container_accessor ( ContainerType &  container_) [inline]

Member Function Documentation

reference at ( AccessType const &  element) [inline]
const_reference at ( AccessType const &  element) const [inline]
pointer find ( AccessType const &  element) [inline]
const_pointer find ( AccessType const &  element) const [inline]
bool is_valid ( ) const [inline]
reference operator() ( AccessType const &  element) [inline]
const_reference operator() ( AccessType const &  element) const [inline]

Field Documentation

ContainerType* container [protected]
UnpackT unpack [protected]

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