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

Accessor class implementing the field concept for dense containers (most importantly std::vector<> and std::deque<>). 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_field ()
 dense_container_field (ContainerType &container_)
 dense_container_field (ContainerType &container_, value_type const &value_type_)
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
value_type default_value
UnpackT unpack

Detailed Description

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

Accessor class implementing the field concept for dense containers (most importantly std::vector<> and std::deque<>).

Template Parameters:
ContainerTypeType of the dense container, e.g. std::vector<double>
AccessTypeThe element type from which data is queried, e.g. a vertex

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_field ( ) [inline]
dense_container_field ( ContainerType &  container_) [inline]
dense_container_field ( ContainerType &  container_,
value_type const &  value_type_ 
) [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: