src/componentid

Source   Edit  

Types

ComponentId = distinct uint
Source   Edit  

Vars

componentIds {.compileTime.} = Table[int, ComponentId]()
Source   Edit  
nextComponentId {.compileTime.} = 0'u64
Source   Edit  

Consts

ArchetypeWords {.intdefine.} = 1
Source   Edit  

Procs

proc `$`(id: ComponentId): string {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc `==`(a, b: ComponentId): bool {.borrow, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc hash(id: ComponentId): Hash {.borrow, ...raises: [], tags: [], forbids: [].}
Source   Edit  

Macros

macro toComponentId[T](typ: typedesc[T]): ComponentId
Source   Edit