+ vector< SMDS_ElemIteratorPtr > elemItVec;
+ if ( _elementsByType )
+ {
+ // create an iterator returning all elements by type
+ for ( int type = SMDSEntity_Node + 1; type < SMDSEntity_Last; ++type )
+ {
+ if ( type == SMDSEntity_Ball )
+ continue; // not supported
+ elemIt = myMesh->elementEntityIterator( SMDSAbs_EntityType( type ));
+ if ( elemIt->more() )
+ elemItVec.push_back( elemIt );
+ }
+ typedef SMDS_IteratorOnIterators< const SMDS_MeshElement*,
+ vector< SMDS_ElemIteratorPtr > > TVecIterator;
+ elemIt.reset( new TVecIterator( elemItVec ));
+ }
+