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

Non-const iterator for the pool. More...

#include <ArenaPoolAllocator.h>

Inheritance diagram for SG::ArenaPoolAllocator::iterator:
Collaboration diagram for SG::ArenaPoolAllocator::iterator:

Public Member Functions

 iterator ()
 Default constructor. More...
 
 iterator (pointer p, ArenaBlock *block)
 Constructor. More...
 

Private Member Functions

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

Private Attributes

ArenaBlockm_block
 Block containing the current element. More...
 

Friends

class const_iterator
 
class boost::iterator_core_access
 

Detailed Description

Non-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 53 of file ArenaPoolAllocator.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

SG::ArenaPoolAllocator::iterator::iterator ( )

Default constructor.

◆ iterator() [2/2]

SG::ArenaPoolAllocator::iterator::iterator ( pointer  p,
ArenaBlock block 
)

Constructor.

Parameters
pPointer to the element.
blockBlock containing the element.

Member Function Documentation

◆ increment()

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

Move the iterator forward.

Definition at line 73 of file ArenaPoolAllocator.cxx.

74 {
75  this->base_reference() =
76  ArenaPoolAllocator_iterator_increment (this->base_reference(), m_block);
77 }

Friends And Related Function Documentation

◆ boost::iterator_core_access

friend class boost::iterator_core_access
friend

Definition at line 84 of file ArenaPoolAllocator.h.

◆ const_iterator

friend class const_iterator
friend

Definition at line 76 of file ArenaPoolAllocator.h.

Member Data Documentation

◆ m_block

ArenaBlock* SG::ArenaPoolAllocator::iterator::m_block
private

Block containing the current element.

Definition at line 81 of file ArenaPoolAllocator.h.


The documentation for this class was generated from the following files:
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::ArenaPoolAllocator::iterator::m_block
ArenaBlock * m_block
Block containing the current element.
Definition: ArenaPoolAllocator.h:81