====== std.list ====== Datenstrukturen für ''int64''- und ''Vec2''-Werte: dynamische Liste (''ListInt64'', wächst bei Bedarf), statische Listen mit fix 8 oder 16 Elementen (''StaticList8'', ''StaticList16''), Stack mit 32 Elementen (LIFO, ''StackInt64''), Queue mit 32 Elementen (FIFO, ''QueueInt64'') und Ring-Buffer für ''Vec2''-Werte. Alle Typen unterstützen Add, Get, Set, Len, Clear und IsEmpty. Einsatzbereiche: Protokoll-Parser, Spielmechaniken, Ereignis-Queues, Datenpuffer für Netzwerk-I/O, Algorithmus-Implementierungen. **Autor:** Andreas Röne\\ **Copyright:** 2024-2025 Andreas Röne ---- ===== Typen ===== ==== ListInt64 = int64 ==== ---- ===== Funktionen ===== ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''ListInt64New(): int64'' | pub | Erstellt neue dynamische Liste | | ''ListInt64WithCapacity(capacity: int64): int64'' | pub | Erstellt Liste mit Anfangskapazität | | ''ListInt64Add(list: int64, value: int64): void'' | pub | Fügt Wert am Ende an | | ''ListInt64Get(list: int64, index: int64): int64'' | pub | Liest Wert an Index | | ''ListInt64Set(list: int64, index: int64, value: int64): void'' | pub | Setzt Wert an Index | | ''ListInt64Len(list: int64): int64'' | pub | Gibt Anzahl der Elemente zurück | | ''ListInt64Clear(list: int64): void'' | pub | Entfernt alle Elemente | | ''ListInt64IsEmpty(list: int64): bool'' | pub | Prüft ob Liste leer ist | ==== StaticList8 (struct) ==== ^ Feld ^ Typ ^ | ''data'' | ''array[8]int64'' | | ''length'' | ''int64'' | ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''StaticList8New(): StaticList8'' | pub | Erstellt leere 8-Elemente-Liste | | ''StaticList8Add(list: StaticList8, value: int64): bool'' | pub | Fügt Wert hinzu, bool=Erfolg | | ''StaticList8Get(list: StaticList8, index: int64): int64'' | pub | Liest Wert an Index | | ''StaticList8Set(list: StaticList8, index: int64, value: int64): bool'' | pub | Setzt Wert an Index | | ''StaticList8Len(list: StaticList8): int64'' | pub | Gibt Anzahl der Elemente zurück | | ''StaticList8Clear(list: StaticList8): void'' | pub | Entfernt alle Elemente | | ''StaticList8IsEmpty(list: StaticList8): bool'' | pub | Prüft ob Liste leer ist | ==== StaticList16 (struct) ==== ^ Feld ^ Typ ^ | ''data'' | ''array[16]int64'' | | ''length'' | ''int64'' | ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''StaticList16New(): StaticList16'' | pub | Erstellt leere 16-Elemente-Liste | | ''StaticList16Add(list: StaticList16, value: int64): bool'' | pub | Fügt Wert hinzu, bool=Erfolg | | ''StaticList16Get(list: StaticList16, index: int64): int64'' | pub | Liest Wert an Index | | ''StaticList16Set(list: StaticList16, index: int64, value: int64): bool'' | pub | Setzt Wert an Index | | ''StaticList16Len(list: StaticList16): int64'' | pub | Gibt Anzahl der Elemente zurück | | ''StaticList16Clear(list: StaticList16): void'' | pub | Entfernt alle Elemente | | ''StaticList16IsEmpty(list: StaticList16): bool'' | pub | Prüft ob Liste leer ist | ==== Vec2List = int64 ==== ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''Vec2ListNew(): int64 { return 0; }'' | pub | Erstellt neue Vec2-Liste | | ''Vec2ListLen(list: int64): int64 { return 0; }'' | pub | Gibt Anzahl der Elemente zurück | | ''Vec2ListClear(list: int64): void { }'' | pub | Entfernt alle Elemente | | ''Vec2ListIsEmpty(list: int64): bool { return true; }'' | pub | Prüft ob Liste leer ist | ==== RingBufferVec2 = int64 ==== ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''RingBufferVec2New(): int64 { return 0; }'' | pub | Erstellt neuen Vec2-Ringpuffer | | ''RingBufferVec2WithCapacity(cap: int64): int64 { return 0; }'' | pub | Erstellt Ringpuffer mit Kapazität | | ''RingBufferVec2Len(rb: int64): int64 { return 0; }'' | pub | Gibt Anzahl der Elemente zurück | | ''RingBufferVec2IsEmpty(rb: int64): bool { return true; }'' | pub | Prüft ob Puffer leer ist | | ''RingBufferVec2IsFull(rb: int64): bool { return false; }'' | pub | Prüft ob Puffer voll ist | | ''RingBufferVec2Clear(rb: int64): void { }'' | pub | Entfernt alle Elemente | ==== StackInt64 (struct) ==== ^ Feld ^ Typ ^ | ''data'' | ''array[32]int64'' | | ''top'' | ''int64'' | ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''StackInt64New(): StackInt64'' | pub | Erstellt leeren Stack | | ''StackInt64Push(s: StackInt64, value: int64): bool'' | pub | Legt Wert oben auf Stack | | ''StackInt64Pop(s: StackInt64): int64'' | pub | Nimmt oberstes Element vom Stack | | ''StackInt64Peek(s: StackInt64): int64'' | pub | Liest oberstes Element ohne Entnahme | | ''StackInt64IsEmpty(s: StackInt64): bool'' | pub | Prüft ob Stack leer ist | | ''StackInt64IsFull(s: StackInt64): bool'' | pub | Prüft ob Stack voll ist | ==== QueueInt64 (struct) ==== ^ Feld ^ Typ ^ | ''data'' | ''array[32]int64'' | | ''front'' | ''int64'' | | ''rear'' | ''int64'' | | ''count'' | ''int64'' | ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''QueueInt64New(): QueueInt64'' | pub | Erstellt leere Queue | | ''QueueInt64Enqueue(q: QueueInt64, value: int64): bool'' | pub | Fügt Wert am Ende ein | | ''QueueInt64Dequeue(q: QueueInt64): int64'' | pub | Entnimmt Wert vom Anfang | | ''QueueInt64Peek(q: QueueInt64): int64'' | pub | Liest ersten Wert ohne Entnahme | | ''QueueInt64IsEmpty(q: QueueInt64): bool'' | pub | Prüft ob Queue leer ist | | ''QueueInt64IsFull(q: QueueInt64): bool'' | pub | Prüft ob Queue voll ist |