ESyS-Particle  2.3.4
Raw2InteractionReader.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 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.apache.org/licenses/LICENSE-2.0 //
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 
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
esys::lsm::Raw2InteractionReader::Raw2InteractionReader
Raw2InteractionReader()
esys::lsm::Raw2InteractionReader::next
InteractionData next()
Definition: Raw2InteractionReader.h:41
esys::lsm::Raw2InteractionReader::Raw2InteractionReader
Raw2InteractionReader(const Raw2InteractionReader &reader)
esys::lsm::Raw2InteractionReader
Definition: Raw2InteractionReader.h:27
Raw2InteractionReader.h
esys::lsm::Raw2InteractionReader::Raw2InteractionReader
Raw2InteractionReader(std::istream &iStream)
Definition: Raw2InteractionReader.h:31
StringUtil.h
esys::lsm::Raw2InteractionReader::hasNext
bool hasNext() const
Definition: Raw2InteractionReader.h:36
esys::lsm::Contact::read
void read(std::istream &iStream)
Definition: Contact.h:210
esys::lsm::Raw2InteractionReader::InteractionData
Contact InteractionData
Definition: Raw2InteractionReader.h:29
esys
Definition: CheckPointable.cpp:17
esys::lsm::Contact
Definition: Contact.h:120
esys::lsm::Raw2InteractionReader::m_pIStream
std::istream * m_pIStream
Definition: Raw2InteractionReader.h:53
vec3.h
esys::lsm::Raw2InteractionReader::operator=
Raw2InteractionReader & operator=(const Raw2InteractionReader &reader)
Contact.h