SbFifo(3)
π SbFifo(3) β Library Functions Manual π
okay bestie, gather round, because today we're talking about SbFifo from the Coin library, and it's literally the class for managing a pointer first-in, first-out queue. yes. a queue. the data structure. she's iconic, she's thread-aware, she's giving main character energy in your scene graph. β¨
πΈ NAME πΈ
SbFifo β a class for managing a pointer first-in, first-out queue. that's it, that's the whole vibe. π
π 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 her. nine little methods. all of them doing their thing. no cap. π
π¦ Detailed Description π¦
A class for managing a pointer first-in, first-out queue.
that's the whole thing. she queues pointers. first one in is the first one out. fifo. you knew that. but now you know you know that. π
π 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 just meant as a user data tag, and a 0 value can be given as the type argument if type data is uninteresting. so like, if you don't care what kind of thing you're shoving in there, just pass 0 and move on with your day. she won't judge. π«Ά
π
void SbFifo::retrieve (void *& ptr, uint32_t & type) [inline]
Reads a pointer from the queue. Blocks until a pointer is available for reading.
ngl, she will wait for you. she will sit there, arms crossed, until a pointer shows up. so maybe don't call her on the main thread unless you're ready to commit. π
π
SbBool SbFifo::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. The function does not block.
this is the chill version of retrieve(). she peeks in, and if there's nothing there she's like "okay cool, bye" and hands you a FALSE. no waiting, no drama. the respectful queen we all deserve. β¨
π
unsigned int SbFifo::size (void ) const [inline]
Returns number of pointers currently in the queue.
just a headcount. how many pointers are currently vibing in the fifo. π’
π
void SbFifo::lock (void ) const [inline]
Blocks until the queue can be locked.
she's asking for the aux cord. if somebody else has it, she waits her turn. polite. patient. π
π
void SbFifo::unlock (void ) const [inline]
Unlocks the queue.
you gave the aux cord back. thank you for your service. π
π
SbBool SbFifo::peek (void *& item, uint32_t & type) const [inline]
Peeks at the head item of the queue without removing it. In the case where the fifo is empty, FALSE is returned.
β οΈ bestie listen to me. the queue must be locked with SbFifo::lock() before using this function, then unlocked. do not skip this step. this is not optional. i am holding your hand when i say this. π
π
SbBool SbFifo::contains (void * item) const [inline]
Returns TRUE or FALSE depending on whether the item is in the queue.
is she there or is she not there. that's the whole question. π
β οΈ again β the queue must be locked with SbFifo::lock() before using this function, then unlocked. same rules, same energy, every single time. π₯
π
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 was there, she's gone now, and you get a TRUE. if she was never there, you get a FALSE and honestly? valid. π«Ά
β οΈ you already know what i'm gonna say. the queue must be locked with SbFifo::lock() before using this function, then unlocked. lock it. use it. unlock it. periodt. π
π Author π
Generated automatically by Doxygen for Coin from the source code. she didn't write herself, bestie. a robot did. and honestly? she ate. π€β¨
and that's the whole page!! that was SbFifo(3) from Coin, Version 2.5.0, living in section 3 of the manual (Library Functions Manual) β go forth and queue your pointers responsibly, lock before you peek, and never forget to unlock. mwah. ππ¦πΈπ
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms