CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::ConstStackIteratorInterface< TStackData, TParticleInterface, MSecondaryProducer, TStackType > Class Template Reference

This is the iterator class for const-access to stack data. More...

#include <StackIteratorInterface.hpp>

Inheritance diagram for corsika::ConstStackIteratorInterface< TStackData, TParticleInterface, MSecondaryProducer, TStackType >:

Public Types

typedef TParticleInterface< ConstStackIteratorInterface< TStackData, TParticleInterface, MSecondaryProducer, TStackType > > particle_interface_type
 
typedef TStackType stack_type
 
typedef TStackData stack_data_type
 

Public Member Functions

 ConstStackIteratorInterface (ConstStackIteratorInterface &&rhs)
 
 ConstStackIteratorInterface (stack_type const &data, unsigned int const index)
 
bool isErased () const
 
Iterator interface
ConstStackIteratorInterfaceoperator++ ()
 
ConstStackIteratorInterface operator++ (int)
 
ConstStackIteratorInterface operator+ (int const delta) const
 
bool operator== (ConstStackIteratorInterface const &rhs) const
 
bool operator!= (ConstStackIteratorInterface const &rhs) const
 
bool operator== (StackIteratorInterface< stack_data_type, TParticleInterface, MSecondaryProducer, stack_type > const &rhs) const
 
bool operator!= (StackIteratorInterface< stack_data_type, TParticleInterface, MSecondaryProducer, stack_type > const &rhs) const
 
particle_interface_type const & operator* () const
 

Protected Member Functions

Stack data access

Only the const versions for read-only access

unsigned int getIndex () const
 
stack_type const & getStack () const
 
stack_data_type const & getStackData () const
 
unsigned int getIndexFromIterator () const
 Get data index as mapped in Stack class.
 

Protected Attributes

unsigned int index_ = 0
 

Friends

class Stack< stack_data_type, TParticleInterface, MSecondaryProducer >
 
class Stack< stack_data_type &, TParticleInterface, MSecondaryProducer >
 
class ParticleBase< ConstStackIteratorInterface >
 
template<typename T1 , template< typename > typename M1, template< class T2, template< class > class T3 > class M2>
class SecondaryView
 
class StackIteratorInterface< stack_data_type, TParticleInterface, MSecondaryProducer, stack_type >
 
template<typename T , template< typename > typename TParticleInterface_>
class corsika::history::HistorySecondaryProducer
 

Detailed Description

template<typename TStackData, template< typename > typename TParticleInterface, template< typename T1, template< class > class T2 > class MSecondaryProducer, typename TStackType = Stack<TStackData, TParticleInterface, MSecondaryProducer>>
class corsika::ConstStackIteratorInterface< TStackData, TParticleInterface, MSecondaryProducer, TStackType >

This is the iterator class for const-access to stack data.

The const counterpart of StackIteratorInterface, which is used for read-only iterator access on particle stack:

for (auto const& p : theStack) { E += p.getEnergy(); }

See documentation of StackIteratorInterface for more details:

See also
StackIteratorInterface.

Definition at line 33 of file StackIteratorInterface.hpp.

Constructor & Destructor Documentation

◆ ConstStackIteratorInterface()

template<typename TStackData , template< typename > typename TParticleInterface, template< typename T1, template< class > class T2 > class MSecondaryProducer, typename TStackType = Stack<TStackData, TParticleInterface, MSecondaryProducer>>
corsika::ConstStackIteratorInterface< TStackData, TParticleInterface, MSecondaryProducer, TStackType >::ConstStackIteratorInterface ( ConstStackIteratorInterface< TStackData, TParticleInterface, MSecondaryProducer, TStackType > &&  rhs)
inline
Todo:
check rule of five

Definition at line 297 of file StackIteratorInterface.hpp.


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