56 MapType::const_iterator iter =
mData.find( entity_handle );
58 if( iter !=
mData.end() )
60 ptr = iter->second.data();
61 length = iter->second.size();
95 const void** pointers,
104 for(
size_t i = 0; i < num_entities; ++i )
116 const void** pointers,
126 for( i =
entities.begin(); i !=
entities.end(); ++i, ++pointers, ++lengths )
156 void const*
const* pointers,
163 for(
size_t i = 0; i < num_entities; ++i )
170 if( iter !=
mData.end() )
172 iter->second.clear();
184 void const*
const* pointers,
192 for( i =
entities.begin(); i !=
entities.end(); ++i, ++pointers, ++lengths )
195 mData[*i].set( *pointers, *lengths );
198 MapType::iterator iter =
mData.find( *i );
199 if( iter !=
mData.end() )
201 iter->second.clear();
214 const void* value_ptr,
227 for(
size_t i = 0; i < num_entities; ++i )
236 const void* value_ptr,
251 mData[*i].set( value_ptr, value_len );
259 size_t num_entities )
262 for(
size_t i = 0; i < num_entities; ++i )
265 if( p ==
mData.end() )
282 MapType::iterator p =
mData.find( *i );
283 if( p ==
mData.end() )
305 template <
class Container >
308 VarLenSparseTag::MapType::const_iterator iter;
309 typename Container::iterator hint = output_range.begin();
312 for( iter = mData.begin(); iter != mData.end(); ++iter )
313 hint = output_range.insert( hint, iter->first );
317 #ifdef MOAB_HAVE_UNORDERED_MAP
318 for( iter = mData.begin(); iter != mData.end(); ++iter )
319 if(
TYPE_FROM_HANDLE( iter->first ) == type ) hint = output_range.insert( hint, iter->first );
322 VarLenSparseTag::MapType::const_iterator end = mData.lower_bound(
LAST_HANDLE( type ) + 1 );
323 for( ; iter != end; ++iter )
324 hint = output_range.insert( hint, iter->first );
329 template <
class Container >
333 Container& output_range )
335 typename Container::iterator hint = output_range.begin();
337 if( mData.find( *i ) != mData.end() ) hint = output_range.insert( hint, *i );
340 template <
class Container >
347 get_tagged< Container >( mData, type,
entities );
352 std::pair< Range::iterator, Range::iterator > r =
intersect->equal_range( type );
353 get_tagged< Container >( mData, r.first, r.second,
entities );
369 size_t& output_count,
375 output_count = counter.
end();
386 Range& output_entities,
389 const EntityType type,
390 const Range* intersect_entities )
const
394 MapType::const_iterator iter, end;
395 #ifdef MOAB_HAVE_UNORDERED_MAP
396 if( intersect_entities )
398 std::pair< Range::iterator, Range::iterator > r;
401 r.first = intersect_entities->
begin();
402 r.second = intersect_entities->
end();
418 seqman->get_entities( type, tmp );
422 if( intersect_entities )
426 iter =
mData.lower_bound( p->first );
427 end =
mData.upper_bound( p->second );
435 iter =
mData.begin();
456 unsigned long& total,
457 unsigned long& per_entity )
const
459 total =
mData.size() * ( 3 *
sizeof(
void* ) +
sizeof(
VarLenTag ) );
460 for( MapType::const_iterator i =
mData.begin(); i !=
mData.end(); ++i )
461 total += i->second.mem();
462 if( !
mData.empty() ) per_entity = total /
mData.size();