Types
BlockIter = object
BlockStore[V] = ref object
- Stores a block of packed values
Entry[V] = ptr EntryData[V]
Procs
proc `[]`[V](store: BlockStore[V]; idx: uint): var V
- Reads a field
proc del[V](store: var BlockStore[V]; idx: uint): V
- Deletes a field
func len[V](blockstore: var BlockStore[V]): uint
- Returns the length of this blockstore
proc newBlockStore[V](size: SomeInteger): BlockStore[V]
- Instantiates a new BlockStore
proc next[V](store: var BlockStore[V]; iter: var BlockIter): ptr V {.inline.}
- Returns the next value in an iterator
proc reserve[V](blockstore: var BlockStore[V]): Entry[V]
- Reserves a slot for a value
Iterators
iterator items[V](store: var BlockStore[V]): var V
- Iterate through all values in this BlockStore
Templates
template `[]=`[V](store: BlockStore[V]; idx: uint; newValue: V)
- Sets a new value for a key
template push[V](store: var BlockStore[V]; newValue: V): uint
- Adds a value and returns an index to it