Open Inventor Reference
SoCallbackList Class Reference

Manages a list of callback functions and associated data. More...

#include <Inventor/misc/SoCallbackList.h>

Public Member Functions

 SoCallbackList ()
 Constructor and destructor.
 
 ~SoCallbackList ()
 Constructor and destructor.
 
void addCallback (SoCallbackListCB *f, void *userData=NULL)
 Managing callback functions At callback time, f will be called with userData as the first parameter, and callback specific data as the second parameter.
 
void removeCallback (SoCallbackListCB *f, void *userData=NULL)
 Adds a function to or removes a function from the list of callback functions.
 
void clearCallbacks ()
 Clears all callback functions from the list.
 
int getNumCallbacks () const
 Returns the number of callback functions in the list.
 
void invokeCallbacks (void *callbackData)
 Invokes each callback function in the list, passing each function the user data supplied when they were registered here, and callbackData, the callback-specific data supplied by the caller.
 

Detailed Description

This class manages a list of callback functions and user data. The user can add a callback function to the list, along with user data. When the callback is invoked, it is passed this user data, along with callback data specified by the invoking routine. The type of this callback data is determined by the invoking routine.

Definition at line 82 of file SoCallbackList.h.

Constructor & Destructor Documentation

◆ SoCallbackList()

SoCallbackList::SoCallbackList ( )

◆ ~SoCallbackList()

SoCallbackList::~SoCallbackList ( )

Member Function Documentation

◆ addCallback()

void SoCallbackList::addCallback ( SoCallbackListCB f,
void *  userData = NULL 
)

e.g. (*f)(userData, callbackData); Adds a function to or removes a function from the list of callback functions.

◆ clearCallbacks()

void SoCallbackList::clearCallbacks ( )
inline

Definition at line 105 of file SoCallbackList.h.

◆ getNumCallbacks()

int SoCallbackList::getNumCallbacks ( ) const
inline

Definition at line 107 of file SoCallbackList.h.

◆ invokeCallbacks()

void SoCallbackList::invokeCallbacks ( void *  callbackData)

◆ removeCallback()

void SoCallbackList::removeCallback ( SoCallbackListCB f,
void *  userData = NULL 
)

The documentation for this class was generated from the following file: