MARLEY (Model of Argon Reaction Low Energy Yields)  v1.1.0
A Monte Carlo event generator for tens-of-MeV neutrino-nucleus interactions in liquid argon
 All Classes Functions Variables Enumerations Pages
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
marley::IteratorToMember< It, T, R > Class Template Reference

Template class that creates an iterator to a class member based on an iterator to the class object. More...

#include <IteratorToMember.hh>

Public Types

typedef std::iterator_traits
< It >::difference_type 
difference_type
 
typedef std::iterator_traits
< It >::iterator_category 
iterator_category
 
typedef R * pointer
 
typedef R & reference
 
typedef R value_type
 

Public Member Functions

 IteratorToMember (It from, R T::*memptr)
 Construction from an iterator and a pointer to member. More...
 
bool operator!= (const IteratorToMember< It, T, R > &rhs) const
 
reference operator* () const
 
IteratorToMember operator+ (difference_type n) const
 
IteratorToMemberoperator++ ()
 
IteratorToMember operator++ (int)
 Postfix operator++ (dummy argument) More...
 
IteratorToMemberoperator+= (difference_type n)
 
IteratorToMember operator- (difference_type n) const
 
difference_type operator- (const IteratorToMember< It, T, R > &rhs) const
 
IteratorToMemberoperator-- ()
 
IteratorToMember operator-- (int)
 Postfix operator-- (see note about the postfix operator++)
 
IteratorToMemberoperator-= (difference_type n)
 
pointer operator-> () const
 
bool operator== (const IteratorToMember< It, T, R > &rhs) const
 
reference operator[] (difference_type n) const
 

Public Attributes

It m_it
 

Protected Attributes

value_type T::* m_memptr
 

Detailed Description

template<typename It, typename T, typename R>
class marley::IteratorToMember< It, T, R >

Template class that creates an iterator to a class member based on an iterator to the class object.

The IteratorToMember class is based on this code.

Template Parameters
Ittype of the original iterator
Ttype pointed to by original iterator
Rtype of the member we want to point to

Constructor & Destructor Documentation

template<typename It, typename T, typename R>
marley::IteratorToMember< It, T, R >::IteratorToMember ( It  from,
R T::*  memptr 
)
inline

Construction from an iterator and a pointer to member.

Parameters
fromIterator to the object
memptrPointer to the member of interest

Member Function Documentation

template<typename It , typename T , typename R >
IteratorToMember< It, T, R > marley::IteratorToMember< It, T, R >::operator++ ( int  )
inline

Postfix operator++ (dummy argument)

Note
The standard behavior for this operator is to return the un-incremented value while incrementing the operand. See discussion here.

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