ESyS-Particle  2.3
Raw2InteractionReader.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef ESYS_LSMRAW2INTERACTIONREADER_H
14 #define ESYS_LSMRAW2INTERACTIONREADER_H
15 
16 #include "Foundation/vec3.h"
17 #include "Foundation/StringUtil.h"
19 
20 #include <iostream>
21 
22 namespace esys
23 {
24  namespace lsm
25  {
27  {
28  public:
30 
31  Raw2InteractionReader(std::istream &iStream)\
32  : m_pIStream(&iStream)
33  {
34  }
35 
36  bool hasNext() const
37  {
38  return ((m_pIStream->peek()) != std::istream::traits_type::eof());
39  }
40 
41  InteractionData next()
42  {
43  InteractionData data;
44  data.read(*m_pIStream);
45  return data;
46  }
47 
48  private:
52 
53  std::istream *m_pIStream;
54  };
55  }
56 }
57 
58 #endif
void read(std::istream &iStream)
Definition: Contact.h:210
Raw2InteractionReader & operator=(const Raw2InteractionReader &reader)
InteractionData next()
Definition: Raw2InteractionReader.h:41
Definition: CheckPointable.cpp:16
Contact InteractionData
Definition: Raw2InteractionReader.h:29
Raw2InteractionReader(std::istream &iStream)
Definition: Raw2InteractionReader.h:31
Definition: Contact.h:119
Definition: Raw2InteractionReader.h:26
bool hasNext() const
Definition: Raw2InteractionReader.h:36
std::istream * m_pIStream
Definition: Raw2InteractionReader.h:53