Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::SetIterator Class Referenceabstract

#include <SetIterator.hpp>

+ Inheritance diagram for moab::SetIterator:
+ Collaboration diagram for moab::SetIterator:

Public Member Functions

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...
 
virtual ErrorCode get_next_arr (std::vector< EntityHandle > &arr, bool &atend)=0
 get the next chunkSize entities Return the next chunkSize entities. More...
 
virtual ErrorCode reset ()=0
 reset the iterator to the beginning of the set More...
 

Protected Member Functions

 SetIterator (Core *core, EntityHandle eset, unsigned int chunk_sz, EntityType ent_tp, int ent_dim, bool check_valid=false)
 Constructor. More...
 

Protected Attributes

CoremyCore
 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...
 

Friends

class Core
 

Detailed Description

Definition at line 14 of file SetIterator.hpp.

Constructor & Destructor Documentation

◆ ~SetIterator()

moab::SetIterator::~SetIterator ( )
virtual

destructor

Definition at line 16 of file SetIterator.cpp.

17 {
18  myCore->remove_set_iterator( this );
19 }

References myCore, and moab::Core::remove_set_iterator().

◆ SetIterator()

moab::SetIterator::SetIterator ( Core core,
EntityHandle  eset,
unsigned int  chunk_sz,
EntityType  ent_tp,
int  ent_dim,
bool  check_valid = false 
)
inlineprotected

Constructor.

Parameters
coreMOAB Core instance
ent_setEntitySet to which this iterator corresponds
chunk_sizeChunk size of this iterator
ent_typeEntity type for this iterator
ent_dimEntity dimension for this iterator

Definition at line 64 of file SetIterator.hpp.

70  : myCore( core ), entSet( eset ), chunkSize( chunk_sz ), entType( ent_tp ), entDimension( ent_dim ),
71  checkValid( check_valid ){};

Member Function Documentation

◆ chunk_size()

unsigned int moab::SetIterator::chunk_size ( ) const
inline

get the chunk size of this iterator

Definition at line 29 of file SetIterator.hpp.

30  {
31  return chunkSize;
32  };

References chunkSize.

◆ ent_dimension()

int moab::SetIterator::ent_dimension ( ) const
inline

get the dimension for this iterator

Definition at line 41 of file SetIterator.hpp.

42  {
43  return entDimension;
44  };

References entDimension.

◆ ent_set()

EntityHandle moab::SetIterator::ent_set ( ) const
inline

get the ent set for this iterator

Definition at line 23 of file SetIterator.hpp.

24  {
25  return entSet;
26  };

References entSet.

◆ ent_type()

EntityType moab::SetIterator::ent_type ( ) const
inline

get the entity type for this iterator

Definition at line 35 of file SetIterator.hpp.

36  {
37  return entType;
38  };

References entType.

◆ get_next_arr()

virtual ErrorCode moab::SetIterator::get_next_arr ( std::vector< EntityHandle > &  arr,
bool &  atend 
)
pure virtual

get the next chunkSize entities Return the next chunkSize entities.

Parameters
arrArray of entities returned.
atendReturns true if iterator is at the end of iterable values, otherwise false

Implemented in moab::VectorSetIterator, and moab::RangeSetIterator.

◆ reset()

virtual ErrorCode moab::SetIterator::reset ( )
pure virtual

reset the iterator to the beginning of the set

Implemented in moab::VectorSetIterator, and moab::RangeSetIterator.

Friends And Related Function Documentation

◆ Core

friend class Core
friend

Definition at line 17 of file SetIterator.hpp.

Member Data Documentation

◆ checkValid

bool moab::SetIterator::checkValid
protected

check for entity validity before returning handles

Definition at line 89 of file SetIterator.hpp.

Referenced by moab::RangeSetIterator::get_next_arr(), and moab::VectorSetIterator::get_next_arr().

◆ chunkSize

unsigned int moab::SetIterator::chunkSize
protected

◆ entDimension

int moab::SetIterator::entDimension
protected

◆ entSet

EntityHandle moab::SetIterator::entSet
protected

handle for entity set corresponding to this iterator

Definition at line 77 of file SetIterator.hpp.

Referenced by moab::RangeSetIterator::build_pair_vec(), ent_set(), moab::RangeSetIterator::get_next_arr(), and moab::VectorSetIterator::get_next_arr().

◆ entType

EntityType moab::SetIterator::entType
protected

◆ myCore

Core* moab::SetIterator::myCore
protected

The documentation for this class was generated from the following files: