ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SG::ArenaPoolAllocator::const_iterator Class Reference

Const iterator for the pool. More...

#include <ArenaPoolAllocator.h>

Inheritance diagram for SG::ArenaPoolAllocator::const_iterator:
Collaboration diagram for SG::ArenaPoolAllocator::const_iterator:

Public Member Functions

 const_iterator ()
 Default constructor. More...
 
 const_iterator (pointer p, const ArenaBlock *block)
 Constructor. More...
 
 const_iterator (const iterator &it)
 Constructor from iterator. More...
 

Private Member Functions

void increment ()
 Move the iterator forward. More...
 

Private Attributes

const ArenaBlockm_block
 Block containing the current element. More...
 

Friends

class boost::iterator_core_access
 

Detailed Description

Const iterator for the pool.

It iterates over all allocated blocks (in unspecified order).

We use boost::iterator_adaptor, and take a pointer as the base iterator type. Besides that, we also need to record the current block which we're within.

Definition at line 99 of file ArenaPoolAllocator.h.

Constructor & Destructor Documentation

◆ const_iterator() [1/3]

SG::ArenaPoolAllocator::const_iterator::const_iterator ( )

Default constructor.

◆ const_iterator() [2/3]

SG::ArenaPoolAllocator::const_iterator::const_iterator ( pointer  p,
const ArenaBlock block 
)

Constructor.

Parameters
pPointer to the element.
blockBlock containing the element.

◆ const_iterator() [3/3]

SG::ArenaPoolAllocator::const_iterator::const_iterator ( const iterator it)

Constructor from iterator.

Parameters
itThe iterator to copy.

Member Function Documentation

◆ increment()

void SG::ArenaPoolAllocator::const_iterator::increment ( )
private

Move the iterator forward.

Definition at line 83 of file ArenaPoolAllocator.cxx.

84 {
85  ArenaPoolAllocator::const_pointer base = this->base_reference();
87  this->base_reference() = base;
88 }

Friends And Related Function Documentation

◆ boost::iterator_core_access

friend class boost::iterator_core_access
friend

Definition at line 133 of file ArenaPoolAllocator.h.

Member Data Documentation

◆ m_block

const ArenaBlock* SG::ArenaPoolAllocator::const_iterator::m_block
private

Block containing the current element.

Definition at line 130 of file ArenaPoolAllocator.h.


The documentation for this class was generated from the following files:
base
std::string base
Definition: hcg.cxx:78
SG::ArenaPoolAllocator::const_iterator::m_block
const ArenaBlock * m_block
Block containing the current element.
Definition: ArenaPoolAllocator.h:130
SG::ArenaPoolAllocator_iterator_increment
ArenaPoolAllocator::pointer ArenaPoolAllocator_iterator_increment(ArenaPoolAllocator::pointer base, ArenaBlock *&block)
Helper: common code for advancing an iterator.
Definition: ArenaPoolAllocator.cxx:27
SG::ArenaAllocatorBase::const_pointer
const char * const_pointer
And a const version of the pointer.
Definition: ArenaAllocatorBase.h:140