|
Urho3D
|
Hash set/map base class. More...
#include </home/runner/work/Dviglo/Dviglo/DvigloRepository/Source/Urho3D/Container/HashBase.h>
Public Member Functions | |
| HashBase () | |
| Construct. | |
| void | Swap (HashBase &rhs) |
| Swap with another hash set or map. | |
| unsigned | Size () const |
| Return number of elements. | |
| unsigned | NumBuckets () const |
| Return number of buckets. | |
| bool | Empty () const |
| Return whether has no elements. | |
Static Public Attributes | |
| static const unsigned | MIN_BUCKETS = 8 |
| Initial amount of buckets. | |
| static const unsigned | MAX_LOAD_FACTOR = 4 |
| Maximum load factor. | |
Protected Member Functions | |
| void | AllocateBuckets (unsigned size, unsigned numBuckets) |
| Allocate bucket head pointers + room for size and bucket count variables. | |
| void | ResetPtrs () |
| Reset bucket head pointers. | |
| void | SetSize (unsigned size) |
| Set new size. | |
| HashNodeBase ** | Ptrs () const |
| Return bucket head pointers. | |
Protected Attributes | |
| HashNodeBase * | head_ |
| List head node pointer. | |
| HashNodeBase * | tail_ |
| List tail node pointer. | |
| HashNodeBase ** | ptrs_ |
| Bucket head pointers. | |
| AllocatorBlock * | allocator_ |
| Node allocator. | |
Hash set/map base class.
Note that to prevent extra memory use due to vtable pointer, HashBase intentionally does not declare a virtual destructor and therefore HashBase pointers should never be used.
1.8.17