src/archetype

Search:
Group by:
Source   Edit  

Types

Archetype = ref object
  id*: ArchetypeId
  componentIds*: seq[ComponentId]
  componentLists*: Table[ComponentId, EcsSeqAny]
Source   Edit  
ArchetypeId = PackedSet[ComponentId]
Source   Edit  
ComponentId = distinct int
Source   Edit  

Procs

proc `$`(id: ComponentId): string {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc add(archetype: var Archetype; adders: Table[ComponentId, Adder]): int {.
    ...raises: [Exception, KeyError], tags: [RootEffect], forbids: [].}
Source   Edit  
proc add[T: tuple](archetype: var Archetype; components: sink T): int
Source   Edit  
proc archetypeIdFrom(compIds: seq[ComponentId]): ArchetypeId {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc contains(archetype: Archetype; candidateId: ArchetypeId): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc contains(archetype: Archetype; candidateId: ComponentId): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc disjointed(archetype: Archetype; candidateId: ArchetypeId): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc isEmpty(archetype: Archetype): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc makeArchetype(compIds: seq[ComponentId]; builders: seq[Builder];
                   movers: seq[Mover]): Archetype {....raises: [Exception],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc makeNextAdding(archetype: Archetype; compIds: seq[ComponentId];
                    builders: seq[Builder]; movers: seq[Mover]): Archetype {.
    ...raises: [Exception], tags: [RootEffect], forbids: [].}
Source   Edit  
proc makeNextRemoving(archetype: Archetype; compIds: seq[ComponentId]): Archetype {.
    ...raises: [Exception], tags: [RootEffect], forbids: [].}
Source   Edit  
proc moveAdding(fromArchetype: var Archetype; fromArchetypeEntityId: int;
                toArchetype: var Archetype; adders: Table[ComponentId, Adder]): int {.
    ...raises: [KeyError, Exception], tags: [RootEffect], forbids: [].}
Source   Edit  
proc moveRemoving(fromArchetype: var Archetype; fromArchetypeEntityId: int;
                  toArchetype: var Archetype): int {.
    ...raises: [KeyError, Exception], tags: [RootEffect], forbids: [].}
Source   Edit  
proc remove(archetype: var Archetype; archetypeEntityId: int) {....raises: [],
    tags: [], forbids: [].}
Source   Edit  

Iterators

iterator components[T](archetype: Archetype; componentId: ComponentId): T
Source   Edit  
iterator entities(archetype: Archetype): int {....raises: [KeyError], tags: [],
    forbids: [].}
Source   Edit  

Macros

macro fieldTypes(tup: typed; body: untyped): untyped
Source   Edit