38 if( bits > 8 )
return MB_FAILURE;
44 unsigned ln2storedbits = 0;
62 for( EntityType t = (EntityType)0; t !=
MBMAXTYPE; ++t )
64 for(
size_t i = 0; i <
pageList[t].size(); ++i )
76 void* gen_data )
const
82 unsigned char* data =
reinterpret_cast< unsigned char*
>( gen_data );
83 for(
size_t i = 0; i < num_handles; ++i )
85 unpack( handles[i], type, page, offset );
99 const void* gen_data )
106 const unsigned char* data =
reinterpret_cast< const unsigned char*
>( gen_data );
107 for(
size_t i = 0; i < num_handles; ++i )
109 unpack( handles[i], type, page, offset );
122 const void* value_ptr,
132 const unsigned char value = *
reinterpret_cast< const unsigned char*
>( value_ptr );
133 for(
size_t i = 0; i < num_handles; ++i )
135 unpack( handles[i], type, page, offset );
150 for(
size_t i = 0; i < num_handles; ++i )
152 unpack( handles[i], type, page, offset );
167 unsigned char* data =
reinterpret_cast< unsigned char*
>( gen_data );
171 unpack( i->first, type, page, offset );
173 count = i->second - i->first + 1;
176 memset( data, def, count );
183 size_t pcount = std::min( (
EntityID)( per_page - offset ), count );
187 memset( data, def, pcount );
207 const unsigned char* data =
reinterpret_cast< const unsigned char*
>( gen_data );
211 unpack( i->first, type, page, offset );
213 count = i->second - i->first + 1;
220 size_t pcount = std::min( (
EntityID)( per_page - offset ), count );
234 const Range& handles,
235 const void* value_ptr,
246 const unsigned char value = *
reinterpret_cast< const unsigned char*
>( value_ptr );
250 unpack( i->first, type, page, offset );
252 count = i->second - i->first + 1;
259 size_t pcount = std::min( (
EntityID)( per_page - offset ), count );
280 unpack( i->first, type, page, offset );
282 count = i->second - i->first + 1;
286 size_t pcount = std::min( (
EntityID)( per_page - offset ), count );
338 template <
class Container >
341 std::pair< EntityType, EntityType > r =
type_range( type );
342 typename Container::iterator hint =
entities.begin();
344 for( EntityType t = r.first; t != r.second; ++t )
346 for(
size_t i = 0; i <
pageList[t].size(); ++i )
355 hint =
entities.insert( hint, h, last );
361 template <
class Container >
368 typename Container::iterator hint =
entities.begin();
374 unpack( h, type, page, offset );
383 hint =
entities.insert( hint, h, h + pcount - 1 );
394 template <
class Container >
399 get_tagged< Container >( type,
entities );
404 std::pair< Range::iterator, Range::iterator > r =
intersect->equal_range( type );
405 get_tagged< Container >( r.first, r.second,
entities );
424 get_tagged< InsertCount >( counter, type,
intersect );
425 count = counter.
end();
431 Range& output_entities,
435 const Range* intersect_entities )
const
437 if( value_bytes && value_bytes != 1 )
442 const signed char bits = *
reinterpret_cast< const unsigned char*
>( value );
443 if( intersect_entities )
451 std::pair< EntityType, EntityType > r =
type_range( type );
453 for( EntityType t = r.first; t != r.second; ++t )
455 for(
size_t i = 0; i <
pageList[t].size(); ++i )
473 unsigned char bits )
const
478 for( --in_type; in_type >=
MBVERTEX; --in_type )
490 std::pair< Range::iterator, Range::iterator > r = range.
equal_range( in_type );
497 unpack( h, type, page, offset );
498 assert(
MBMAXTYPE == in_type || type == in_type );
524 for( EntityType t = (EntityType)0; t <
MBMAXTYPE; ++t )
527 for(
size_t i = 0; i <
pageList[t].size(); ++i )
539 unpack( h, type, page, offset );