ocean.util.container.map.model

Modules

Bucket
module ocean.util.container.map.model.Bucket

Template for a struct implementing a single bucket in a set (see ocean.util.container.map.model.BucketSet). A bucket contains a set of elements which can be added to, removed from and searched.

BucketElementFreeList
module ocean.util.container.map.model.BucketElementFreeList

Free list of dynamically allocated objects. Implemented as a linked list; a subclass must get and set the next one of a given object.

BucketElementGCAllocator
module ocean.util.container.map.model.BucketElementGCAllocator

A bucket element allocator using the D runtime memory manager. Bucket elements are newed by get() and deleted by recycle().

BucketElementMallocAllocator
module ocean.util.container.map.model.BucketElementMallocAllocator

Base class for a bucket element allocator using malloc function bypassing the GC.

BucketInfo
module ocean.util.container.map.model.BucketInfo

Bucket set helper class for bookkeeping of the number of elements in each bucket.

BucketSet
module ocean.util.container.map.model.BucketSet

Template for a class implementing a set of buckets containing elements indexed by unique keys. The bucket set contains both a set of buckets and a pool of bucket elements. The bucket elements are structured as linked lists, thus each bucket simply contains a pointer to its first element.

IAllocator
module ocean.util.container.map.model.IAllocator

Interface for an object allocator.

IBucketElementGCAllocator
module ocean.util.container.map.model.IBucketElementGCAllocator

Base class for a bucket element allocator using the D runtime memory manager. Even though this memory manager is called "GC-managed" this class in fact doesn't rely on garbage collection but explicitly deletes unused bucket elements.

MapIterator
module ocean.util.container.map.model.MapIterator

Utility template to implement Map.opApply()/Set.opApply(), working around the problem that opApply() cannot have static array parameters because 'ref' is forbidden for static arrays. The solution is to use dynamic arrays instead and pass an array slice to to the 'foreach' loop body delegate.

StandardHash
module ocean.util.container.map.model.StandardHash

Hash calculator used in Map and Set, uses FNV1a to hash primitive values and dynamic or static arrays of such.