ZyanList_(3)

πŸ“¦
version 1.5.2 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

ZyanList_ β€” that's her. This is the ZyanList_(3) page from the Library Functions Manual, and she's here to explain the ZyanList struct situation. πŸ’…


✨ SYNOPSIS ✨

#include <List.h>

🌸 Public Attributes 🌸

  • ZyanAllocator * allocator
  • ZyanUSize size
  • ZyanUSize element_size
  • ZyanMemberProcedure destructor
  • ZyanListNode * head
  • ZyanListNode * tail
  • void * buffer
  • ZyanUSize capacity
  • ZyanListNode * first_unused

πŸ¦‹ Detailed Description πŸ¦‹

okay so this whole thing defines the ZyanList struct. That's the main character. πŸ’–

But bestie, listen: All fields in this struct should be considered as "private". Like, every single one. Any changes may lead to unexpected behavior. So no cap, do not poke them unless you're supposed to. 😭


πŸŽ€ Member Data Documentation πŸŽ€

πŸ‘‘ ZyanAllocator* ZyanList_::allocator

The memory allocator. That's it, that's the field. ✨

🧺 void* ZyanList_::buffer

The data buffer. 🌈

Only used for instances created by ZyanListInitCustomBuffer.

πŸ“¦ ZyanUSize ZyanList_::capacity

The data buffer capacity (number of bytes). So like, how much room the buffer has. πŸ“

Only used for instances created by ZyanListInitCustomBuffer.

🧹 ZyanMemberProcedure ZyanList_::destructor

The element destructor callback. She cleans up. πŸ’…

πŸ“ ZyanUSize ZyanList_::element_size

The size of a single element in bytes. One element. In bytes. iconic. πŸŽ€

πŸ”— ZyanListNode* ZyanList_::first_unused

The first unused node. πŸ‘€

When removing a node, the first-unused value is updated to point at the removed node and the next node of the removed node will be updated to point at the old first-unused node.

When appending the memory of the first unused-node is recycled to store the new node. The value of the first-unused node is then updated to point at the reused nodes next node.

If the first-unused value is ZYAN_NULL, any new node will be "allocated" behind the tail node (if there is enough space left in the fixed size buffer).

Only used for instances created by ZyanListInitCustomBuffer.

🫢 ZyanListNode* ZyanList_::head

The head node. The front. The beginning. The main character of the linked list. πŸ’–

πŸ”’ ZyanUSize ZyanList_::size

The current number of elements in the list. So how many besties are in the list right now. ✨

🎯 ZyanListNode* ZyanList_::tail

The tail node. The back. The end. The finale. πŸ’…


πŸ“ Author πŸ“

Generated automatically by Doxygen for Zycore from the source code. So yeah, no human author, just Doxygen doing its little automated thing. πŸ€–


and that's the whole ZyanList_(3) page, bestie! this came from Zycore Version 1.5.2.0, page ZyanList_(3). slay, bye! πŸ’–βœ¨

πŸ“¦ where this page comes from