ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils::PackedArray::proxy Class Reference

proxy class for representing an lvalue to an element of PackedArray. More...

#include <PackedArray.h>

Collaboration diagram for CxxUtils::PackedArray::proxy:

Public Member Functions

 proxy (PackedArray &arr, size_type n)
 Constructor, from a PackedArray and index n.
 operator value_type () const
 Retrieve the element referenced by the proxy.
proxyoperator= (value_type v)
 Set the element referenced by the proxy to v.

Private Attributes

PackedArraym_arr
 Reference to the container referenced by the proxy.
size_type m_n
 Index of the element referenced by the proxy.

Detailed Description

proxy class for representing an lvalue to an element of PackedArray.

Definition at line 57 of file PackedArray.h.

Constructor & Destructor Documentation

◆ proxy()

CxxUtils::PackedArray::proxy::proxy ( PackedArray & arr,
size_type n )
inline

Constructor, from a PackedArray and index n.

Definition at line 61 of file PackedArray.h.

61: m_arr (arr), m_n (n) {}
PackedArray & m_arr
Reference to the container referenced by the proxy.
Definition PackedArray.h:71
size_type m_n
Index of the element referenced by the proxy.
Definition PackedArray.h:74

Member Function Documentation

◆ operator value_type()

CxxUtils::PackedArray::proxy::operator value_type ( ) const
inline

Retrieve the element referenced by the proxy.

Definition at line 64 of file PackedArray.h.

64{ return m_arr.get (m_n); }

◆ operator=()

proxy & CxxUtils::PackedArray::proxy::operator= ( value_type v)
inline

Set the element referenced by the proxy to v.

Definition at line 67 of file PackedArray.h.

67{ m_arr.set (m_n, v); return *this; }

Member Data Documentation

◆ m_arr

PackedArray& CxxUtils::PackedArray::proxy::m_arr
private

Reference to the container referenced by the proxy.

Definition at line 71 of file PackedArray.h.

◆ m_n

size_type CxxUtils::PackedArray::proxy::m_n
private

Index of the element referenced by the proxy.

Definition at line 74 of file PackedArray.h.


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