Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
MBIter.hpp File Reference
#include "Internals.hpp"
#include "moab/Range.hpp"
#include "moab/Core.hpp"
#include <vector>
#include <algorithm>
+ Include dependency graph for MBIter.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  iBase_EntityArrIterator_Private
class  iBase_EntityArrIterator_Private::IsType
class  MBIter< Container >

Defines

#define IS_BUILDING_MB

Typedefs

typedef MBIter< std::vector
< EntityHandle > > 
MBListIter
typedef MBIter< moab::RangeMBRangeIter

Functions

template<typename T >
ErrorCode step_iterator (T &curr, const T &end, int num_steps, bool &at_end)
template<typename T >
ErrorCode step_iterator (typename std::vector< T >::const_iterator &curr, const typename std::vector< T >::const_iterator &end, int num_steps, bool &at_end)
ErrorCode step_iterator (Range::const_iterator &curr, const Range::const_iterator &end, int num_steps, bool &at_end)

Define Documentation

#define IS_BUILDING_MB

Definition at line 4 of file MBIter.hpp.


Typedef Documentation

typedef MBIter< std::vector< EntityHandle > > MBListIter

Definition at line 187 of file MBIter.hpp.

Definition at line 188 of file MBIter.hpp.


Function Documentation

template<typename T >
ErrorCode step_iterator ( T curr,
const T end,
int  num_steps,
bool &  at_end 
) [inline]

Definition at line 73 of file MBIter.hpp.

References MB_SUCCESS.

Referenced by MBIter< Container >::step().

{
    if( 0 > num_steps ) return MB_FAILURE;

    while( num_steps && curr != end )
    {
        num_steps--;
        curr++;
    }
    at_end = ( curr == end );
    return MB_SUCCESS;
}
template<typename T >
ErrorCode step_iterator ( typename std::vector< T >::const_iterator &  curr,
const typename std::vector< T >::const_iterator &  end,
int  num_steps,
bool &  at_end 
) [inline]

Definition at line 87 of file MBIter.hpp.

References MB_SUCCESS.

{
    if( 0 > num_steps ) return MB_FAILURE;

    assert( curr <= end );  // Sanity check
    at_end = ( end - curr <= num_steps );

    if( at_end )
        curr = end;
    else
        curr += num_steps;
    return MB_SUCCESS;
}
ErrorCode step_iterator ( Range::const_iterator &  curr,
const Range::const_iterator &  end,
int  num_steps,
bool &  at_end 
) [inline]

Definition at line 104 of file MBIter.hpp.

References MB_SUCCESS.

{
    if( 0 > num_steps ) return MB_FAILURE;

    at_end = ( end - curr <= num_steps );

    if( at_end )
        curr = end;
    else
        curr += num_steps;
    return MB_SUCCESS;
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines