Public Types | Public Member Functions

ElementProxy< Iterator > Class Template Reference

A proxy for Iterators, such that an Iterator's element looks like an Iterator's element (!), even though it isn't (the internal storage layout may be different). More...

#include <Iterator.hpp>

List of all members.

Public Types

Public Member Functions


Detailed Description

template<class Iterator>
class ElementProxy< Iterator >

A proxy for Iterators, such that an Iterator's element looks like an Iterator's element (!), even though it isn't (the internal storage layout may be different).

Parameters:
Iterator The Iterator must export
array_t (typedef) the type of each component
Components (enum) the number of components
getComponent(int idx,int c) a function returning a reference to the c'th component of the idx'th index in the field.

Constructor & Destructor Documentation

template<class Iterator >
ElementProxy< Iterator >::ElementProxy ( const Iterator Owner,
index_t  Idx 
) [inline]

Construct an ElementProxy as a reference to a specific element in a given array, which is accessed via the given Iterator.

Parameters:
Owner the Iterator referring to the array

Member Function Documentation

template<class Iterator >
ElementProxy< Iterator >::operator array_t (  )  const [inline]

Implicit type conversion into an array element.

Note:
This function creates a temporary object; it is convenient, but slow.