17 #if !defined(OPENNURBS_MAP_INC_)
18 #define OPENNURBS_MAP_INC_
95 size_t ActiveSerialNumberCount()
const;
102 size_t ActiveIdCount()
const;
158 struct SN_ELEMENT* FindSerialNumber(
unsigned int sn)
const;
208 struct SN_ELEMENT* AddSerialNumber(
unsigned int sn);
264 struct SN_ELEMENT* RemoveSerialNumberAndId(
unsigned int sn);
350 SN_BLOCK_CAPACITY = 8192,
352 ID_HASH_TABLE_COUNT = 8192
359 unsigned int m_sorted;
362 struct SN_ELEMENT m_sn[SN_BLOCK_CAPACITY];
364 void CullBlockHelper();
365 void SortBlockHelper();
366 bool IsValidBlock(
ON_TextLog* textlog,
struct SN_ELEMENT*
const* hash_table,
size_t* active_id_count)
const;
367 struct SN_ELEMENT* BinarySearchBlockHelper(
unsigned int sn);
368 static int CompareMaxSN(
const void*,
const void*);
369 size_t ActiveElementEstimate(
unsigned int sn0,
unsigned int sn1)
const;
373 unsigned int m_maxsn;
374 unsigned int m_reserved;
377 ON_MEMORY_POOL* m_pool;
384 bool m_bHashTableIsValid;
385 size_t m_active_id_count;
400 struct SN_BLOCK** m_snblk_list;
401 size_t m_snblk_list_capacity;
402 size_t m_snblk_list_count;
409 struct SN_BLOCK* m_e_blk;
414 SN_BLOCK m_sn_block0;
416 struct SN_ELEMENT* FindElementHelper(
unsigned int sn);
417 void UpdateMaxSNHelper();
418 void GarbageCollectHelper();
419 size_t GarbageCollectMoveHelper(SN_BLOCK* dst,SN_BLOCK* src);
425 struct SN_ELEMENT* m_hash_table[ID_HASH_TABLE_COUNT];
426 size_t HashIndex(
const ON_UUID*)
const;
427 void InvalidateHashTableHelper();
428 bool RemoveBlockFromHashTableHelper(
const struct SN_BLOCK* blk);
429 void AddBlockToHashTableHelper(
struct SN_BLOCK* blk);
430 void BuildHashTableHelper();
unsigned char m_sn_active
unsigned char m_reserved1
unsigned char m_id_active
struct SN_ELEMENT * m_next
unsigned char m_reserved2