Project
Loading...
Searching...
No Matches
o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType > Class Template Reference

#include <RawParser.h>

Public Types

using parent_type = ParentType
 
using self_type = Iterator
 
using iterator_category = std::forward_iterator_tag
 
using value_type = T
 
using reference = T &
 
using pointer = T *
 

Public Member Functions

 Iterator ()=delete
 
 Iterator (parent_type parser, int start=0)
 
 ~Iterator ()=default
 
self_typeoperator++ ()
 
self_type operator++ (int)
 
reference operator* ()
 
bool operator== (const self_type &other) const
 
bool operator!= (const self_type &rh) const
 
buffer_type const * raw () const
 get pointer to raw block at current position, rdh starts here
 
buffer_type const * data () const
 get pointer to payload at current position
 
size_t offset () const
 offset of payload at current position
 
size_t size () const
 get size of payload at current position
 
size_t sizeTotal () const
 get size of payload + header at current position
 
template<typename U >
U const * get_if (U const *=nullptr) const
 

Friends

std::ostream & operator<< (std::ostream &os, self_type const &it)
 

Detailed Description

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T, typename ParentType>
class o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >

Iterator implementation Supports the following operations:

  • increment (there is no decrement, its not a bidirectional parser)
  • dereference operator returns RawDataHeaderInfo as common header
  • member function data() returns pointer to payload at current position
  • member function size() return size of payload at current position

Definition at line 515 of file RawParser.h.

Member Typedef Documentation

◆ iterator_category

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::iterator_category = std::forward_iterator_tag

Definition at line 520 of file RawParser.h.

◆ parent_type

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::parent_type = ParentType

Definition at line 518 of file RawParser.h.

◆ pointer

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::pointer = T*

Definition at line 523 of file RawParser.h.

◆ reference

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::reference = T&

Definition at line 522 of file RawParser.h.

◆ self_type

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::self_type = Iterator

Definition at line 519 of file RawParser.h.

◆ value_type

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::value_type = T

Definition at line 521 of file RawParser.h.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::Iterator ( )
delete

◆ Iterator() [2/2]

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::Iterator ( parent_type  parser,
int  start = 0 
)
inline

Definition at line 527 of file RawParser.h.

◆ ~Iterator()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::~Iterator ( )
default

Member Function Documentation

◆ data()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
buffer_type const * o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::data ( ) const
inline

get pointer to payload at current position

Definition at line 572 of file RawParser.h.

◆ get_if()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
template<typename U >
U const * o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::get_if ( U const *  = nullptr) const
inline

get header as specific type Normal usage is get_if<T>() but in some rare cases the type can also be passed by parameter get_if((T*)nullptr), the parameter is ignored

Returns
pointer to header of the specified type, or nullptr if type does not match to actual type

Definition at line 600 of file RawParser.h.

◆ offset()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
size_t o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::offset ( ) const
inline

offset of payload at current position

Definition at line 578 of file RawParser.h.

◆ operator!=()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
bool o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::operator!= ( const self_type rh) const
inline

Definition at line 560 of file RawParser.h.

◆ operator*()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
reference o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::operator* ( )
inline

Definition at line 548 of file RawParser.h.

◆ operator++() [1/2]

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
self_type & o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::operator++ ( )
inline

Definition at line 535 of file RawParser.h.

◆ operator++() [2/2]

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
self_type o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::operator++ ( int  )
inline

Definition at line 541 of file RawParser.h.

◆ operator==()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
bool o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::operator== ( const self_type other) const
inline

Definition at line 553 of file RawParser.h.

◆ raw()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
buffer_type const * o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::raw ( ) const
inline

get pointer to raw block at current position, rdh starts here

Definition at line 566 of file RawParser.h.

◆ size()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
size_t o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::size ( ) const
inline

get size of payload at current position

Definition at line 584 of file RawParser.h.

◆ sizeTotal()

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
size_t o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::Iterator< T, ParentType >::sizeTotal ( ) const
inline

get size of payload + header at current position

Definition at line 590 of file RawParser.h.

Friends And Related Symbol Documentation

◆ operator<<

template<size_t MAX_SIZE = 8192, bool BOUNDS_CHECKS = true>
template<typename T , typename ParentType >
std::ostream & operator<< ( std::ostream &  os,
self_type const &  it 
)
friend

Definition at line 605 of file RawParser.h.


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