pfNameSpace(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
NAMEpfNameSpace - Manage named data attached to objects
FUNCTION SPECIFICATION
#include <Performer/pr/pfNameSpace.h
pfNameSpace* pfNameSpace::getInstance();
void pfNameSpace::insertNamedData(pfObject *object, char *name,
void *data);
void* pfNameSpace::getNamedData(pfObject *object, char *name);
void pfNameSpace::removeNamedData(pfObject *object,
char *name);
void pfNameSpace::setNameChangeCallback(pfObject *object,
char* name, pfNameChangeCallbackType func,
void *userData);
typedef void (*pfNameChangeCallbackType)(void *userData, void *oldData,
void *newData);
DESCRIPTIONpfNameSpace is a mechanism for attaching and retrieving named data on any
pfObject. This named data is used by pfShader and pfShaderManager when
resolving shaders that refer to attributes by name rather than pointer.
pfNameSpace is not multi-buffered, so changes are not frame-synchronous.
pfNameSpace::getInstance returns a pointer to the single, globally active
instance of pfNameSpace.
pfNameSpace::insertNamedData attaches the specified data with the
specified name on the target object. The new data will replace any old
data with the same name.
pfNameSpace::getNamedData returns the the data with the specified name
that's attached to the specified object. If there is no data with the
given name, NULL is returned.
pfNameSpace::removeNamedData removes the data with the specified name
from the specified object if it exists.
pfNameSpace::setNameChangeCallback attaches a callback to the specified
named data that is invoked if the pointer that the name refers to
changes. That is, if calling pfNameSpace::insertNamedData performs a name
replacement rather than a new name insertion. If the specified named data
does not exist in the namespace, the callback is ignored. The userData
pointer is passed through to the callback function when it is invoked.
Page 1
pfNameSpace(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
NOTESBUGSSEE ALSO
pfShaderManager, pfShader
Page 2