ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils::ArrayIterator< N >::pointer Class Reference

Proxy to return from operator>. More...

#include <Array.h>

Collaboration diagram for CxxUtils::ArrayIterator< N >::pointer:

Public Member Functions

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

Private Attributes

value_type m_a
 The contained Array proxy instance.

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.

Definition at line 414 of file Control/CxxUtils/CxxUtils/Array.h.

Constructor & Destructor Documentation

◆ pointer()

template<unsigned int N>
CxxUtils::ArrayIterator< N >::pointer::pointer ( const ArrayIterator & i)

Proxy constructor.

Parameters
iThe iterator that is being dereferenced.

Member Function Documentation

◆ operator*()

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

Dereference the proxy.

Returns
A copy of the Array proxy.

◆ operator->()

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

Dereference the proxy.

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

Member Data Documentation

◆ m_a

template<unsigned int N>
value_type CxxUtils::ArrayIterator< N >::pointer::m_a
private

The contained Array proxy instance.

Definition at line 442 of file Control/CxxUtils/CxxUtils/Array.h.


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