Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
load_chunk.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_LOAD_CHUNK_H
2#define _RHEOLEF_LOAD_CHUNK_H
23namespace rheolef {
24template <class RandomIterator>
25inline
26bool
27load_chunk (std::istream& s, RandomIterator iter, RandomIterator last)
28{
29 while (iter != last)
30 if (!(s >> *iter++)) return false;
31 return s.good();
32}
33template <class RandomIterator, class GetFunction>
34inline
35bool
36load_chunk (std::istream& s, RandomIterator iter, RandomIterator last, GetFunction get_element)
37{
38 while (iter != last)
39 if (! get_element (s, *iter++)) return false;
40 return s.good();
41}
42} // namespace rheolef
43#endif // _RHEOLEF_LOAD_CHUNK_H
This file is part of Rheolef.
bool load_chunk(std::istream &s, RandomIterator iter, RandomIterator last)
Definition load_chunk.h:27