SoCallbackList(3)
π SoCallbackList β okay bestie, let's talk callback containers π
So this is SoCallbackList(3), from the Library Functions Manual, and ngl it's one of those little utility queens that just does its job and does it flawlessly. β¨
πΈ NAME πΈ
SoCallbackList β the way that this is literally just a container for callback function pointers. That's it. That's the whole vibe. π
π¦ SYNOPSIS π¦
First things first, you gotta invite it to the party:
#include <Inventor/lists/SoCallbackList.h>
π Public Member Functions π
SoCallbackList (void)
~SoCallbackList ()
void addCallback (SoCallbackListCB *f, void *userData=NULL)
void removeCallback (SoCallbackListCB *f, void *userdata=NULL)
void clearCallbacks (void)
int getNumCallbacks (void) const
void invokeCallbacks (void *callbackdata)
β¨ Detailed Description β¨
Okay so <pink>SoCallbackList</pink> is a container for callback function pointers. Periodt. π
Here's the tea: this list stores callback function pointers β and also the user-specified extra data you want passed to those callbacks β and then it hands you a method for triggering the callback functions. So it's like a little group chat of functions, and you get to decide when the whole chat goes off. π«Ά
π Constructor & Destructor Documentation π
π SoCallbackList::SoCallbackList (void )
Default constructor. It makes a baby callback list. That's it, she's born. π£
π SoCallbackList::~SoCallbackList (void )
Destructor. She's leaving, she said goodbye, she's cleaning up. π
π Member Function Documentation π
β void SoCallbackList::addCallback (SoCallbackListCB * f, void * userdata = NULL)
Append the callback function f to the list. π₯ And when it gets invoked, it will be passed the userdata. So userdata is like the little snack you pack for your callback before it goes out β highkey important.
β void SoCallbackList::removeCallback (SoCallbackListCB * f, void * userdata = NULL)
Remove callback f from the list. Bye bestie, we love you, the door's right there. π
β void SoCallbackList::clearCallbacks (void )
Remove all callbacks in the list. Not me nuking the entire group chat in one move. π
β int SoCallbackList::getNumCallbacks (void ) const
Returns number of callback functions. A headcount, fr fr. π’
β void SoCallbackList::invokeCallbacks (void * callbackdata)
Invoke all callback functions, passing the userdata and the callbackdata as the first and second argument, respectively. π₯
Heads up, this part matters: all callbacks registered when the method is invoked will be triggered β even if the code in one callback removes another callback. So the list is locked in for this round, no take-backs. π§
And it is safe for a callback to remove itself or any other callbacks during execution. So yes, a callback can absolutely cancel itself mid-sentence. Main character energy, honestly. π
π Author π
Generated automatically by Doxygen for Coin from the source code.
And that's the whole page, bestie! π This was SoCallbackList(3) from Coin, Version 3.1.3 β slay, go forth and invoke responsibly. π
β¨πΈπ¦ππ
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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