SbFifo(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’– SbFifo(3) β€” the pointer FIFO glow-up πŸ’–

okay so bestie, welcome to SbFifo, a whole class from the Library Functions Manual section of your local man pages, and honestly? she's giving queue management main character energy. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

SbFifo β€” a class for managing a pointer first-in, first-out queue.

like, it's a queue. pointers go in one end, they come out the other. first in, first out, no cutting the line, no cap πŸ’…


🌈 SYNOPSIS 🌈

#include <Inventor/threads/SbFifo.h>

πŸŽ€ Public Member Functions πŸŽ€

void assign (void *ptr, uint32_t type)
void retrieve (void *&ptr, uint32_t &type)
SbBool tryRetrieve (void *&ptr, uint32_t &type)
unsigned int size (void) const
void lock (void) const
void unlock (void) const
SbBool peek (void *&item, uint32_t &type) const
SbBool contains (void *item) const
SbBool reclaim (void *item)

look at that little lineup. nine functions, all iconic, all doing their thing ✨


πŸ¦‹ Detailed Description πŸ¦‹

A class for managing a pointer first-in, first-out queue.

that's the whole vibe. pointers in, pointers out, in the order they arrived, periodt.


πŸ‘‘ Member Function Documentation πŸ‘‘

🌸 void SbFifo::assign (void * ptr, uint32_t type) [inline]

Puts pointer ptr of type type into the fifo. 🫢

the type argument is literally just a lil user data tag β€” it's your label, your sticker, your little name tag at the party. and if type data is uninteresting to you, you can just pass 0 as the type argument and nobody will judge you, fr fr.

πŸ’œ void SbFifo::retrieve (void *& ptr, uint32_t & type) [inline]

Reads a pointer from the queue. and here's the dramatic part: it blocks until a pointer is available for reading. 😭 so if the queue is empty, this function is just gonna sit there. patiently. waiting. like a bestie holding your spot in line.

⭐ SbBool tryRetrieve (void *& ptr, uint32_t & type) [inline]

Tries to read a pointer from the queue. if no data can be read, FALSE is returned, and TRUE otherwise. and the best part? the function does not block. she's noncommittal, she's chill, she tries once and moves on 🌈

🧚 unsigned int SbFifo::size (void ) const [inline]

Returns number of pointers currently in the queue. a little headcount. a vibe check on how many friends are currently in the building πŸ’…

πŸ“ void SbFifo::lock (void ) const [inline]

Blocks until the queue can be locked. yes, blocks β€” she will wait her turn, no cutting, no shoving πŸŽ€

πŸ”₯ void SbFifo::unlock (void ) const [inline]

Unlocks the queue. bye bestie, you're free to go ✨

πŸ’– SbBool SbFifo::peek (void *& item, uint32_t & type) const [inline]

Peeks at the head item of the queue without removing it. it's a little look, not a grab. in the case where the fifo is empty, FALSE is returned. πŸ™ˆ

⚠️ okay important: the queue must be locked with SbFifo::lock() before using this function, then unlocked. do not skip this. do not freestyle this. lock, peek, unlock, in that order, periodt.

🌸 SbBool SbFifo::contains (void * item) const [inline]

Returns TRUE or FALSE depending on whether the item is in the queue. yes/no, in/out, present/absent, that's the whole thing 🫢

⚠️ same rule as before, no exceptions: the queue must be locked with SbFifo::lock() before using this function, then unlocked.

🌈 SbBool SbFifo::reclaim (void * item) [inline]

This function removes the given item from the queue. returns TRUE or FALSE depending on whether the item was in the queue in the first place. so if she wasn't there, you get a FALSE and honestly, fair πŸ’€

⚠️ you already know: the queue must be locked with SbFifo::lock() before using this function, then unlocked.

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for Coin from the source code. not a human, not a bestie, just a doc generator doing its little automated slay ✨


and that's the whole page!! πŸŽ€ mwah πŸ’‹ this cutie comes to you courtesy of Coin, Version 3.1.3, living in the SbFifo(3) era. go lock your queues and stay hydrated, ily πŸ«ΆπŸ’–

πŸ“¦ where this page comes from