16#if !defined(OPENNURBS_MAP_INC_)
17#define OPENNURBS_MAP_INC_
92 size_t ActiveSerialNumberCount()
const;
99 size_t ActiveIdCount()
const;
155 struct SN_ELEMENT* FindSerialNumber(
unsigned int sn)
const;
205 struct SN_ELEMENT* AddSerialNumber(
unsigned int sn);
261 struct SN_ELEMENT* RemoveSerialNumberAndId(
unsigned int sn);
345 SN_BLOCK_CAPACITY = 8192,
347 ID_HASH_TABLE_COUNT = 8192
359 void CullBlockHelper();
360 void SortBlockHelper();
361 bool IsValidBlock(
ON_TextLog* textlog,
struct SN_ELEMENT*
const* hash_table,
size_t* active_id_count)
const;
362 struct SN_ELEMENT* BinarySearchBlockHelper(
unsigned int sn);
363 static int CompareMaxSN(
const void*,
const void*);
364 size_t ActiveElementEstimate(
unsigned int sn0,
unsigned int sn1)
const;
410 struct SN_ELEMENT* FindElementHelper(
unsigned int sn);
411 void UpdateMaxSNHelper();
412 void GarbageCollectHelper();
420 size_t HashIndex(
const ON_UUID*)
const;
421 void InvalidateHashTableHelper();
422 bool RemoveBlockFromHashTableHelper(
const struct SN_BLOCK* blk);
423 void AddBlockToHashTableHelper(
struct SN_BLOCK* blk);
424 void BuildHashTableHelper();
Definition opennurbs_lookup.h:33
ON_MEMORY_POOL * m_pool
Definition opennurbs_lookup.h:371
unsigned int m_maxsn
Definition opennurbs_lookup.h:367
size_t m_snblk_list_capacity
Definition opennurbs_lookup.h:395
size_t m_active_id_count
Definition opennurbs_lookup.h:379
ON_SerialNumberMap(const ON_SerialNumberMap &)
SN_BLOCK m_sn_block0
Definition opennurbs_lookup.h:408
ON_SerialNumberMap & operator=(const ON_SerialNumberMap &)
size_t m_sn_count
Definition opennurbs_lookup.h:374
struct SN_BLOCK ** m_snblk_list
Definition opennurbs_lookup.h:394
size_t m_snblk_list_count
Definition opennurbs_lookup.h:396
struct SN_BLOCK * m_e_blk
Definition opennurbs_lookup.h:403
size_t m_sn_purged
Definition opennurbs_lookup.h:375
unsigned int m_reserved
Definition opennurbs_lookup.h:368
ON_UUID m_inactive_id
Definition opennurbs_lookup.h:380
bool m_bHashTableIsValid
Definition opennurbs_lookup.h:378
Definition opennurbs_array.h:46
Definition opennurbs_textlog.h:20
Definition opennurbs_uuid.h:31
#define ON_CLASS
Definition opennurbs_defines.h:91
unsigned int ON__UINT32
Definition opennurbs_system.h:326
Definition opennurbs_lookup.h:39
void * ptr
Definition opennurbs_lookup.h:43
int i
Definition opennurbs_lookup.h:45
unsigned int ui
Definition opennurbs_lookup.h:44
ON__UINT32 m_u_type
Definition opennurbs_lookup.h:40
Definition opennurbs_lookup.h:351
size_t m_count
Definition opennurbs_lookup.h:352
unsigned int m_sorted
Definition opennurbs_lookup.h:354
unsigned int m_sn0
Definition opennurbs_lookup.h:355
size_t m_purged
Definition opennurbs_lookup.h:353
unsigned int m_sn1
Definition opennurbs_lookup.h:356
Definition opennurbs_lookup.h:50
ON_UUID m_id
Definition opennurbs_lookup.h:55
unsigned int m_sn
Definition opennurbs_lookup.h:62
unsigned char m_sn_active
Definition opennurbs_lookup.h:71
unsigned char m_reserved1
Definition opennurbs_lookup.h:73
unsigned char m_id_active
Definition opennurbs_lookup.h:72
struct SN_ELEMENT * m_next
Definition opennurbs_lookup.h:56
unsigned char m_reserved2
Definition opennurbs_lookup.h:74
Definition opennurbs_memory.h:207