YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
PDLIterator Class Reference

#include <PDL.h>

Inheritance diagram for PDLIterator:

Public Types

using char_type = typename std::string::value_type
 
using traits_type = typename std::string::traits_type
 
using istream_type = std::basic_istream< char_type, traits_type >
 

Public Member Functions

 PDLIterator (istream_type &is)
 
const ParticleTableEntry operator* () const
 
ParticleTableEntry operator-> () const
 
PDLIteratoroperator++ ()
 
PDLIterator operator++ (int)
 post-increment operator (read line in by calling ++(*this))
 

Static Public Member Functions

static const PDLIteratorend ()
 Returns just an empty iterator.
 

Private Member Functions

 PDLIterator ()
 Default constructor (private).
 

Private Attributes

istream_type * InputStream_
 input stream pointer to file being read in by this
 
std::string Value_
 currently loaded line
 

Friends

const bool operator== (const PDLIterator &lhs, const PDLIterator &rhs)
 equality operator; checks if pointers to streams are equal
 

Detailed Description

Stream iterator targeted for .pdl files to read the input stream line by line. It automatically discards comments and non-_add_-entries. When either the EOF or the end keyword is reached, the iterator is set to its end state (i.e. InputStream_ is set to nullptr).

Attention
The line is read when the iterator is incremented.
Isospin and parity are missing from .pdl format!
Author
Paolo Di Giglio

Constructor & Destructor Documentation

PDLIterator ( istream_type &  is)
inline

Construct and read the first line in

Parameters
isifstream to read from

Member Function Documentation

const ParticleTableEntry operator* ( ) const

Deference operator

Returns
#ParticleTableEntry constructed from the file entry currently read into Value_
PDLIterator & operator++ ( )

pre-increment operator (read line in)

Ignores the comments (lines starting with '*') and all the lines not starting with add. If the end keyword is found or the EOF is reached this is set to end()

ParticleTableEntry operator-> ( ) const
inline

Arrow iterator

Returns
i->m is the same as (*i).m

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