#include <AbstractMeshReader.hpp>
Public Member Functions | |
NodeIterator () | |
NodeIterator (unsigned index, AbstractMeshReader *pReader) | |
NodeIterator (const std::set< unsigned > &rIndices, AbstractMeshReader *pReader) | |
unsigned | GetIndex () const |
Private Member Functions | |
void | CacheData (unsigned index, bool firstRead=false) |
void | increment () |
bool | equal (const NodeIterator &rOther) const |
const std::vector< double > & | dereference () const |
Private Attributes | |
unsigned | mIndex |
const std::set< unsigned > * | mpIndices |
std::set< unsigned > ::const_iterator | mIndicesIterator |
AbstractMeshReader * | mpReader |
std::vector< double > | mLastDataRead |
Friends | |
class | boost::iterator_core_access |
An iterator class for node data.
Definition at line 369 of file AbstractMeshReader.hpp.
AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator | ( | ) | [inline] |
Default constructor for an iterator that doesn't point to anything.
Definition at line 376 of file AbstractMeshReader.hpp.
AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator | ( | unsigned | index, | |
AbstractMeshReader * | pReader | |||
) | [inline] |
Constructor for pointing to a specific item.
Note that, in the case of an ASCII mesh file, this will actually start wherever the file pointer currently is. The user is responsible for resetting the reader prior to creating an iterator.
index | the index of the item to point at | |
pReader | the mesh reader to iterate over |
Definition at line 393 of file AbstractMeshReader.hpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::CacheData(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndex.
AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator | ( | const std::set< unsigned > & | rIndices, | |
AbstractMeshReader * | pReader | |||
) | [inline] |
Constructor for iterating over a subset of the items in the mesh.
rIndices | a set of item indices over which to iterate | |
pReader | the mesh reader to iterate over |
Definition at line 301 of file AbstractMeshReader.cpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::CacheData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndex, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndicesIterator, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpIndices, and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpReader.
void AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::CacheData | ( | unsigned | index, | |
bool | firstRead = false | |||
) | [inline, private] |
Read the pointed-at item data (if we're pointing at anything) and cache it within the iterator, for use in dereference.
index | the item to read | |
firstRead | Set to true in the constructor. This ensures that the line 0 is always read |
Definition at line 346 of file AbstractMeshReader.cpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::IsFileFormatBinary(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndex, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mLastDataRead, and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpReader.
Referenced by AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::increment(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator().
const std::vector<double>& AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::dereference | ( | ) | const [inline, private] |
Dereference this iterator to get the data for the item pointed at.
Definition at line 451 of file AbstractMeshReader.hpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mLastDataRead, and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpReader.
bool AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::equal | ( | const NodeIterator & | rOther | ) | const [inline, private] |
rOther | the other iterator |
Definition at line 440 of file AbstractMeshReader.hpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndex.
unsigned AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::GetIndex | ( | ) | const [inline] |
Definition at line 414 of file AbstractMeshReader.hpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndex.
void AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::increment | ( | ) | [inline, private] |
Increment the iterator to point at the next item in the file.
Definition at line 319 of file AbstractMeshReader.cpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::CacheData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndex, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndicesIterator, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpIndices, and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpReader.
unsigned AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndex [private] |
The index of the item pointed at.
Definition at line 460 of file AbstractMeshReader.hpp.
Referenced by AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::CacheData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::equal(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::GetIndex(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::increment(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator().
std::set<unsigned>::const_iterator AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mIndicesIterator [private] |
Iterator over the indices in that subset.
Definition at line 466 of file AbstractMeshReader.hpp.
Referenced by AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::increment(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator().
std::vector<double> AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mLastDataRead [private] |
Data for the last item read.
Definition at line 472 of file AbstractMeshReader.hpp.
Referenced by AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::CacheData(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::dereference().
const std::set<unsigned>* AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpIndices [private] |
The set which we're iterating over, if we are iterating over a subset of the items.
Definition at line 463 of file AbstractMeshReader.hpp.
Referenced by AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::increment(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator().
AbstractMeshReader* AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mpReader [private] |
The mesh reader we're iterating over.
Definition at line 469 of file AbstractMeshReader.hpp.
Referenced by AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::CacheData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::dereference(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::increment(), and AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator().