ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CxxUtils::ArrayIterator::pointer Class Reference

Proxy to return from operator>. More...

#include <Array.h>

Collaboration diagram for CxxUtils::ArrayIterator::pointer:

Public Member Functions

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

Private Attributes

value_type m_a
 The contained Array proxy instance. More...
 

Detailed Description

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 417 of file Control/CxxUtils/CxxUtils/Array.h.

Constructor & Destructor Documentation

◆ pointer()

CxxUtils::ArrayIterator::pointer::pointer ( const ArrayIterator i)

Proxy constructor.

Parameters
iThe iterator that is being dereferenced.

Member Function Documentation

◆ operator*()

value_type CxxUtils::ArrayIterator::pointer::operator* ( ) const

Dereference the proxy.

Returns
A copy of the Array proxy.

◆ operator->()

const value_type* CxxUtils::ArrayIterator::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

value_type CxxUtils::ArrayIterator::pointer::m_a
private

The contained Array proxy instance.

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


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