ESyS-Particle  2.3.2
esys::lsm::IterativeReader< TmplIterator > Class Template Reference

#include <IterativeReader.h>

Inheritance diagram for esys::lsm::IterativeReader< TmplIterator >:

Public Types

typedef TmplIterator Iterator

Public Member Functions

 IterativeReader (std::istream &iStream)
virtual ~IterativeReader ()
virtual void initialise ()
int getNumElements () const
bool isInitialised () const
IteratorgetIterator ()

Protected Types

typedef std::auto_ptr< IteratorIteratorAutoPtr

Protected Member Functions

void setNumElements (int numElements)
std::istream & getIStream ()
const std::istream & getIStream () const
virtual IteratorcreateNewIterator ()

Private Attributes

int m_numElements
std::istream * m_pIStream
IteratorAutoPtr m_iteratorPtr

Detailed Description

template<class TmplIterator>
class esys::lsm::IterativeReader< TmplIterator >

Template class which provides an iterator for reading multiple data-items from a stream.

Parameters
TmplDatadata class. The operator<<(std::istream &iStream, TmplData &data) operator is used to assign stream data inside the methods of the IterativeReader<TmplData>::Iterator class.

Member Typedef Documentation

template<class TmplIterator>
typedef TmplIterator esys::lsm::IterativeReader< TmplIterator >::Iterator
template<class TmplIterator>
typedef std::auto_ptr<Iterator> esys::lsm::IterativeReader< TmplIterator >::IteratorAutoPtr
protected

Constructor & Destructor Documentation

template<class TmplIterator >
esys::lsm::IterativeReader< TmplIterator >::IterativeReader ( std::istream &  iStream)
template<class TmplIterator >
esys::lsm::IterativeReader< TmplIterator >::~IterativeReader ( )
virtual

Member Function Documentation

template<class TmplIterator >
TmplIterator * esys::lsm::IterativeReader< TmplIterator >::createNewIterator ( )
protectedvirtual

Returns a new Iterator object. Caller of this method is to take ownership for the returned object.

Reimplemented in esys::lsm::ParticleReader.

template<class TmplIterator >
std::istream & esys::lsm::IterativeReader< TmplIterator >::getIStream ( )
protected
template<class TmplIterator >
const std::istream & esys::lsm::IterativeReader< TmplIterator >::getIStream ( ) const
protected
template<class TmplIterator >
IterativeReader< TmplIterator >::Iterator & esys::lsm::IterativeReader< TmplIterator >::getIterator ( )

Referenced by Mesh2D::loadCheckPoint(), TriMesh::loadCheckPoint(), and esys::lsm::CheckPointLoader::loadInto().

Here is the caller graph for this function:

template<class TmplIterator >
int esys::lsm::IterativeReader< TmplIterator >::getNumElements ( ) const

Returns the number of elements to be read from the stream.

template<class TmplIterator >
void esys::lsm::IterativeReader< TmplIterator >::initialise ( )
virtual
template<class TmplIterator >
bool esys::lsm::IterativeReader< TmplIterator >::isInitialised ( ) const

Returns whether this reader is initialised, that is, whether an iterator has been created.

References NULL.

template<class TmplIterator >
void esys::lsm::IterativeReader< TmplIterator >::setNumElements ( int  numElements)
protected

Member Data Documentation

template<class TmplIterator>
IteratorAutoPtr esys::lsm::IterativeReader< TmplIterator >::m_iteratorPtr
private
template<class TmplIterator>
int esys::lsm::IterativeReader< TmplIterator >::m_numElements
private
template<class TmplIterator>
std::istream* esys::lsm::IterativeReader< TmplIterator >::m_pIStream
private

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