#include <SetIterator.hpp>
Public Member Functions | |
virtual | ~RangeSetIterator () |
Destructor. More... | |
virtual ErrorCode | get_next_arr (std::vector< EntityHandle > &arr, bool &atend) |
get the next chunkSize entities Return the next chunkSize entities. More... | |
virtual ErrorCode | reset () |
reset the iterator to the beginning of the set More... | |
Public Member Functions inherited from moab::SetIterator | |
virtual | ~SetIterator () |
destructor More... | |
EntityHandle | ent_set () const |
get the ent set for this iterator More... | |
unsigned int | chunk_size () const |
get the chunk size of this iterator More... | |
EntityType | ent_type () const |
get the entity type for this iterator More... | |
int | ent_dimension () const |
get the dimension for this iterator More... | |
Protected Member Functions | |
RangeSetIterator (Core *core, EntityHandle ent_set, int chunk_size, EntityType ent_type, int ent_dimension, bool check_valid=false) | |
Constructor. More... | |
Protected Member Functions inherited from moab::SetIterator | |
SetIterator (Core *core, EntityHandle eset, unsigned int chunk_sz, EntityType ent_tp, int ent_dim, bool check_valid=false) | |
Constructor. More... | |
Private Member Functions | |
ErrorCode | get_next_by_type (const EntityHandle *&ptr, int count, std::vector< EntityHandle > &arr, bool &atend) |
ErrorCode | get_next_by_dimension (const EntityHandle *&ptr, int count, std::vector< EntityHandle > &arr, bool &atend) |
ErrorCode | build_pair_vec () |
Build the special pair vector for the root set. More... | |
Private Attributes | |
EntityHandle | iterPos |
Current iterator position, 0 if at beginning. More... | |
EntityHandle * | pairPtr |
Special range pair ptr for root set. More... | |
int | numPairs |
Number of range pairs. More... | |
Friends | |
class | Core |
Additional Inherited Members | |
Protected Attributes inherited from moab::SetIterator | |
Core * | myCore |
Core instance. More... | |
EntityHandle | entSet |
handle for entity set corresponding to this iterator More... | |
unsigned int | chunkSize |
chunk size of this iterator More... | |
EntityType | entType |
entity type this iterator iterates over More... | |
int | entDimension |
dimension this iterator iterates over More... | |
bool | checkValid |
check for entity validity before returning handles More... | |
Definition at line 95 of file SetIterator.hpp.
|
virtual |
|
protected |
Constructor.
core | MOAB Core instance |
ent_set | EntitySet to which this iterator corresponds |
chunk_size | Chunk size of this iterator |
ent_type | Entity type for this iterator |
ent_dim | Entity dimension for this iterator |
Definition at line 21 of file SetIterator.cpp.
References build_pair_vec(), ErrorCode, and MB_SUCCESS.
|
private |
Build the special pair vector for the root set.
Definition at line 46 of file SetIterator.cpp.
References moab::Range::const_pair_begin(), moab::Range::const_pair_end(), moab::SetIterator::entSet, ErrorCode, moab::Core::get_entities_by_handle(), MB_SUCCESS, moab::SetIterator::myCore, numPairs, pairPtr, and moab::Range::psize().
Referenced by get_next_arr(), and RangeSetIterator().
|
virtual |
get the next chunkSize entities Return the next chunkSize entities.
arr | Array of entities returned. |
atend | Returns true if iterator is at the end of iterable values, otherwise false |
Implements moab::SetIterator.
Definition at line 69 of file SetIterator.cpp.
References build_pair_vec(), moab::SetIterator::checkValid, moab::WriteUtilIface::CONTENTS, moab::SetIterator::entDimension, moab::SetIterator::entSet, ErrorCode, get_next_by_dimension(), get_next_by_type(), iface, moab::Core::is_valid(), MB_SUCCESS, moab::SetIterator::myCore, numPairs, pairPtr, moab::Interface::query_interface(), and moab::Interface::release_interface().
|
private |
Definition at line 175 of file SetIterator.cpp.
References moab::SetIterator::chunkSize, moab::CREATE_HANDLE(), moab::CN::Dimension(), moab::SetIterator::entDimension, moab::SetIterator::entType, moab::GeomUtil::first(), iterPos, moab::LAST_HANDLE(), MB_SET_ERR, MB_SUCCESS, MBMAXTYPE, moab::TYPE_FROM_HANDLE(), and moab::CN::TypeDimensionMap.
Referenced by get_next_arr().
|
private |
Definition at line 124 of file SetIterator.cpp.
References moab::SetIterator::chunkSize, moab::CREATE_HANDLE(), moab::SetIterator::entType, moab::ID_FROM_HANDLE(), iterPos, moab::LAST_HANDLE(), MB_SUCCESS, MBMAXTYPE, and moab::TYPE_FROM_HANDLE().
Referenced by get_next_arr().
|
virtual |
reset the iterator to the beginning of the set
Implements moab::SetIterator.
Definition at line 229 of file SetIterator.cpp.
References iterPos, and MB_SUCCESS.
|
friend |
Definition at line 98 of file SetIterator.hpp.
|
private |
Current iterator position, 0 if at beginning.
Definition at line 141 of file SetIterator.hpp.
Referenced by get_next_by_dimension(), get_next_by_type(), and reset().
|
private |
Number of range pairs.
Definition at line 147 of file SetIterator.hpp.
Referenced by build_pair_vec(), get_next_arr(), and ~RangeSetIterator().
|
private |
Special range pair ptr for root set.
Definition at line 144 of file SetIterator.hpp.
Referenced by build_pair_vec(), get_next_arr(), and ~RangeSetIterator().