experimental/dod_helpers

    Dark Mode
Search:
  Source   Edit

Types

ValueId = distinct uint64
  Source   Edit
ValueIdMask {.inject.} = distinct uint64
  Source   Edit
ValueStore = object
  data: seq[Value]
  Source   Edit

Consts

EmptyValueId = 0'u64
  Source   Edit

Procs

func `$`(id: ValueId): string {....raises: [], tags: [].}
  Source   Edit
func `==`(i1, i2: ValueId): bool {....raises: [], tags: [].}
  Source   Edit
func `==`(m1`gensym14, m2`gensym14: ValueIdMask): bool {.inject, ...raises: [],
    tags: [].}
  Source   Edit
func `[]`[T](i: OptIndex[T]): T {.inline.}
Returns the underlying index value. i is required to store a valid value   Source   Edit
func add(store: var ValueStore; item: Value): ValueId {....raises: [], tags: [].}
  Source   Edit
func getMask(id`gensym14: ValueId): ValueIdMask {.inject, ...raises: [], tags: [].}
  Source   Edit
func isNil(i: ValueId): bool {....raises: [], tags: [].}
  Source   Edit
func isNone[T](i: OptIndex[T]): bool {.inline.}
Tests if i is empty, i.e. doesn't store a valid index-like   Source   Edit
func isSome[T](i: OptIndex[T]): bool {.inline.}
Tests if i stores a valid index-like value   Source   Edit
func len(store: ValueStore): int {....raises: [], tags: [].}
  Source   Edit
func popMask(id`gensym14: ValueId): ValueId {.inject, ...raises: [], tags: [].}
  Source   Edit
func setMask(id`gensym14: var ValueId; mask`gensym14: ValueIdMask) {.inject,
    ...raises: [], tags: [].}
  Source   Edit
func someOpt[T](i: T): auto {.inline.}
Returns the index-like value i as the corresponding nilable type   Source   Edit
func toIndex(id: ValueId): int {....raises: [], tags: [].}
  Source   Edit
func toValueId(idx: int): ValueId {....raises: [], tags: [].}
  Source   Edit

Iterators

iterator items(store: ValueStore): Value {....raises: [], tags: [].}
  Source   Edit
iterator mitems(store: var ValueStore): var Value {....raises: [], tags: [].}
  Source   Edit
iterator mpairs(store: var ValueStore): (ValueId, var Value) {....raises: [],
    tags: [].}
  Source   Edit
iterator pairs(store: ValueStore): (ValueId, Value) {....raises: [], tags: [].}
  Source   Edit

Macros

macro declareStoredTableField(Db, field, Name, Typ: untyped): untyped
  Source   Edit
macro declareStoredTableSeqField(Db, field, Name, Typ: untyped): untyped
  Source   Edit

Templates

template `==`[T](a, b: OptIndex[T]): bool
Compares a and b for equality. If both are 'nil', they're are also treated as equal   Source   Edit
template `[]`(store: var ValueStore; index: ValueId): Value
  Source   Edit
template declareHighMasking(Name: untyped;
                            highMaskRange: static[range[0 .. 64]] = 0;
                            BaseType: typed = uint64): untyped
  Source   Edit
template declareIdType(Name: untyped; addHash: static[bool] = false;
                       BaseType: typed = uint64): untyped {.dirty.}
  Source   Edit
template declareStoreField(Type, field, Name: untyped): untyped {.dirty.}
  Source   Edit
template declareStoreType(Name: untyped): untyped {.dirty.}
  Source   Edit
template noneOpt[T](t: typedesc[T]): untyped
Returns the value representing 'none' (or 'nil') for the index-like T   Source   Edit
template opt[T](t: typedesc[T]): untyped
A type operator that returns the nilable version of the index-like type T. To indicate that T represents an index-like, a tag routine of the form indexLike(typedesc[T]): void has to be visible   Source   Edit