Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
MBIter< Container > Class Template Reference

#include <MBIter.hpp>

+ Inheritance diagram for MBIter< Container >:
+ Collaboration diagram for MBIter< Container >:

Public Member Functions

 MBIter (iBase_EntityType type, iMesh_EntityTopology topology, EntityHandle set, int arr_size, bool recursive=false)
 ~MBIter ()
Container::const_iterator position () const
Container::const_iterator end () const
ErrorCode step (int num_steps, bool &at_end)
void get_entities (Core *mb, EntityHandle *array, int &count)
virtual ErrorCode reset (Interface *mb)

Protected Attributes

Container iterData
Container::const_iterator iterPos

Detailed Description

template<class Container>
class MBIter< Container >

Definition at line 121 of file MBIter.hpp.


Constructor & Destructor Documentation

template<class Container >
MBIter< Container >::MBIter ( iBase_EntityType  type,
iMesh_EntityTopology  topology,
EntityHandle  set,
int  arr_size,
bool  recursive = false 
) [inline]

Definition at line 128 of file MBIter.hpp.

        : iBase_EntityArrIterator_Private( type, topology, set, arr_size, recursive ), iterPos( iterData.end() )
    {
    }
template<class Container >
MBIter< Container >::~MBIter ( ) [inline]

Definition at line 137 of file MBIter.hpp.

{}

Member Function Documentation

template<class Container >
Container::const_iterator MBIter< Container >::end ( ) const [inline]

Definition at line 144 of file MBIter.hpp.

References MBIter< Container >::iterData.

Referenced by iMesh_connectIterate(), iMesh_coordsIterate(), iMesh_tagIterate(), and MBIter< Container >::step().

    {
        return iterData.end();
    };
template<class Container >
void MBIter< Container >::get_entities ( Core *  mb,
EntityHandle *  array,
int &  count 
) [inline, virtual]

Implements iBase_EntityArrIterator_Private.

Definition at line 154 of file MBIter.hpp.

References iBase_EntityArrIterator_Private::arrSize, MBIter< Container >::iterData, and MBIter< Container >::iterPos.

    {
        for( count = 0; count < arrSize && iterPos != iterData.end(); ++iterPos )
            if( mb->is_valid( *iterPos ) ) array[count++] = *iterPos;
    }
template<class Container >
Container::const_iterator MBIter< Container >::position ( ) const [inline]

Definition at line 139 of file MBIter.hpp.

References MBIter< Container >::iterPos.

Referenced by iMesh_connectIterate(), iMesh_coordsIterate(), and iMesh_tagIterate().

    {
        return iterPos;
    };
template<class Container >
virtual ErrorCode MBIter< Container >::reset ( Interface *  mb) [inline, virtual]

Implements iBase_EntityArrIterator_Private.

Definition at line 160 of file MBIter.hpp.

References iBase_EntityArrIterator_Private::entSet, iBase_EntityArrIterator_Private::entTopo, iBase_EntityArrIterator_Private::entType, ErrorCode, iBase_ALL_TYPES, iBase_REGION, iMesh_ALL_TOPOLOGIES, iMesh_SEPTAHEDRON, iBase_EntityArrIterator_Private::isRecursive, MBIter< Container >::iterData, MBIter< Container >::iterPos, MB_SUCCESS, mb_topology_table, MBENTITYSET, MBKNIFE, and iBase_EntityArrIterator_Private::remove_type().

    {
        ErrorCode result;
        iterData.clear();
        if( entTopo != iMesh_ALL_TOPOLOGIES )
        {
            if( entTopo == iMesh_SEPTAHEDRON )
                result = MB_SUCCESS;
            else
                result = mb->get_entities_by_type( entSet, mb_topology_table[entTopo], iterData, isRecursive );
        }
        else if( entType != iBase_ALL_TYPES )
        {
            result = mb->get_entities_by_dimension( entSet, entType, iterData, isRecursive );
            if( entType == iBase_REGION ) remove_type( iterData, MBKNIFE );
        }
        else
        {
            result = mb->get_entities_by_handle( entSet, iterData, isRecursive );
            remove_type( iterData, MBENTITYSET );
            remove_type( iterData, MBKNIFE );
        }
        iterPos = iterData.begin();
        return result;
    }
template<class Container >
ErrorCode MBIter< Container >::step ( int  num_steps,
bool &  at_end 
) [inline, virtual]

Implements iBase_EntityArrIterator_Private.

Definition at line 149 of file MBIter.hpp.

References MBIter< Container >::end(), MBIter< Container >::iterPos, and step_iterator().

    {
        return step_iterator( iterPos, end(), num_steps, at_end );
    }

Member Data Documentation

template<class Container >
Container MBIter< Container >::iterData [protected]
template<class Container >
Container::const_iterator MBIter< Container >::iterPos [protected]

List of all members.


The documentation for this class was generated from the following file:
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines