CxxUtils::ArrayIterator< N >::pointer Class Reference

Proxy to return from operator>. More...

#include <Array.h>

List of all members.

Public Member Functions

 pointer (const ArrayIterator &i)
 Proxy constructor.
value_type operator* () const
 Dereference the proxy.
const value_typeoperator-> () const
 Dereference the proxy.

Detailed Description

template<unsigned int N>
class CxxUtils::ArrayIterator< N >::pointer

Proxy to return from operator>.

operator-> is required to either return an actual C++ pointer or another object that has a valid operator->. This makes things a bit tricky if you're using proxies. We have the ArrayIterator operator-> return an instance of this proxy class, which contains an instance of the Array proxy. The operator-> of this proxy then returns a pointer to the contained Array. This will work for most common usages. However, the pointer one gets from the operator-> here will only be valid until the proxy is destroyed.


Constructor & Destructor Documentation

template<unsigned int N>
CxxUtils::ArrayIterator< N >::pointer::pointer ( const ArrayIterator i  )  [inline]

Proxy constructor.

Parameters:
i The iterator that is being dereferenced.

Member Function Documentation

template<unsigned int N>
ArrayIterator< N >::value_type CxxUtils::ArrayIterator< N >::pointer::operator* (  )  const [inline]

Dereference the proxy.

Returns:
A copy of the Array proxy.
template<unsigned int N>
const ArrayIterator< N >::value_type * CxxUtils::ArrayIterator< N >::pointer::operator-> (  )  const [inline]

Dereference the proxy.

Returns:
A pointer to the Array proxy. This proxy is only until the pointer instance is destroyed.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1