Om
Public Member Functions | Private Attributes | List of all members
Om::Source::IteratorSource< ThisItem, ThisIterator > Class Template Reference

A Source adapter for a sentinal-terminated input iterator. More...

#include "iterator_source.hpp"

+ Inheritance diagram for Om::Source::IteratorSource< ThisItem, ThisIterator >:
+ Collaboration diagram for Om::Source::IteratorSource< ThisItem, ThisIterator >:

Public Member Functions

 IteratorSource (ThisIterator const theIterator)
 
IteratorSourceoperator= (IteratorSource)
 
virtual bool operator! () const
 
virtual ThisItem & operator* () const
 
bool Equals (IteratorSource const &) const
 
virtual void Pop ()
 Pops the current item. More...
 
void Swap (IteratorSource &)
 
- Public Member Functions inherited from Om::Source::DefaultSource< ThisItem, IteratorSource< ThisItem, ThisIterator > >
virtual ~DefaultSource ()=0
 
IteratorSource< ThisItem, ThisIterator > & operator++ ()
 Pulls the next item from the Source. More...
 
IteratorSource< ThisItem, ThisIterator > operator++ (int)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
virtual bool Equals (Source< ThisItem > const &) const
 
bool Equals (IteratorSource< ThisItem, ThisIterator > const &) const
 
- Public Member Functions inherited from Om::Source::Source< ThisItem >
virtual ~Source ()=0
 
ThisItem * operator-> () const
 
 operator Boolean () const
 Implements the Safe Boolean idiom. More...
 

Private Attributes

ThisIterator thisIterator
 The input iterator. More...
 

Additional Inherited Members

- Public Types inherited from Om::Source::Source< ThisItem >
typedef void(Source::* Boolean) () const
 The implementation of the Safe Boolean idiom. More...
 

Detailed Description

template<typename ThisItem, typename ThisIterator>
class Om::Source::IteratorSource< ThisItem, ThisIterator >

Template Parameters
ThisItemThe item type, which must implement the ! operator such that it only returns true for the sentinal.
ThisIteratorThe iterator type.

Definition at line 40 of file iterator_source.hpp.

Constructor & Destructor Documentation

◆ IteratorSource()

template<typename ThisItem , typename ThisIterator >
Om::Source::IteratorSource< ThisItem, ThisIterator >::IteratorSource ( ThisIterator const  theIterator)
explicit
Parameters
theIteratorThe input iterator, dereferencable to a valid item.

Member Function Documentation

◆ operator=()

template<typename ThisItem , typename ThisIterator >
IteratorSource& Om::Source::IteratorSource< ThisItem, ThisIterator >::operator= ( IteratorSource< ThisItem, ThisIterator >  )

◆ operator!()

template<typename ThisItem , typename ThisIterator >
virtual bool Om::Source::IteratorSource< ThisItem, ThisIterator >::operator! ( ) const
virtual
Returns
True if empty.

Implements Om::Source::Source< ThisItem >.

◆ operator*()

template<typename ThisItem , typename ThisIterator >
virtual ThisItem& Om::Source::IteratorSource< ThisItem, ThisIterator >::operator* ( ) const
virtual

◆ Equals()

template<typename ThisItem , typename ThisIterator >
bool Om::Source::IteratorSource< ThisItem, ThisIterator >::Equals ( IteratorSource< ThisItem, ThisIterator > const &  ) const

◆ Pop()

template<typename ThisItem , typename ThisIterator >
virtual void Om::Source::IteratorSource< ThisItem, ThisIterator >::Pop ( )
virtual
Precondition
Not empty.

Implements Om::Source::Source< ThisItem >.

◆ Swap()

template<typename ThisItem , typename ThisIterator >
void Om::Source::IteratorSource< ThisItem, ThisIterator >::Swap ( IteratorSource< ThisItem, ThisIterator > &  )

Member Data Documentation

◆ thisIterator

template<typename ThisItem , typename ThisIterator >
ThisIterator Om::Source::IteratorSource< ThisItem, ThisIterator >::thisIterator
private

Definition at line 83 of file iterator_source.hpp.


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