.TH "SoCallbackList" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoCallbackList \- The \fBSoCallbackList\fP is a container for callback function pointers\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoCallbackList\fP (void)" .br .ti -1c .RI "\fB~SoCallbackList\fP ()" .br .ti -1c .RI "void \fBaddCallback\fP (SoCallbackListCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBremoveCallback\fP (SoCallbackListCB *f, void *userdata=NULL)" .br .ti -1c .RI "void \fBclearCallbacks\fP (void)" .br .ti -1c .RI "int \fBgetNumCallbacks\fP (void) const" .br .ti -1c .RI "void \fBinvokeCallbacks\fP (void *callbackdata)" .br .in -1c .SH "Detailed Description" .PP The \fBSoCallbackList\fP is a container for callback function pointers\&. This list stores callback function pointers (along with user-specified extra data to pass to the callbacks) and provides a method for triggering the callback functions\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoCallbackList::SoCallbackList (void )" Default constructor\&. .SS "SoCallbackList::~SoCallbackList (void )" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SoCallbackList::addCallback (SoCallbackListCB * f, void * userdata = \fRNULL\fP)" Append the callback function \fIf\fP to the list\&. It will be passed the \fIuserdata\fP upon invocation\&. .SS "void SoCallbackList::removeCallback (SoCallbackListCB * f, void * userdata = \fRNULL\fP)" Remove callback \fIf\fP from the list\&. .SS "void SoCallbackList::clearCallbacks (void )" Remove all callbacks in the list\&. .SS "int SoCallbackList::getNumCallbacks (void ) const" Returns number of callback functions\&. .SS "void SoCallbackList::invokeCallbacks (void * callbackdata)" Invoke all callback functions, passing the userdata and the \fIcallbackdata\fP as the first and second argument, respectively\&. .PP All callbacks registered when the method is invoked will be triggered, even though if the code in one callback removes another callback\&. .PP It is safe for a callback to remove itself or any other callbacks during execution\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.