pfvObject(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
NAMEpfvObject - Base Class for pfvDisplayManager and pfvViewer objects
FUNCTION SPECIFICATION
#include <Performer/pfv/pfvDisplay.h>
pfvObject::pfvObject();
virtual int pfvObject::parseXml(pfvXmlNode*xml);
virtual int pfvObject::setXmlField(pfvXmlNode*xml);
char* pfvObject::getName();
void pfvObject::setName(char*_name);
static pfvObject* pfvObject::find(pfList*list, char*_name);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfvObject is derived from the parent class
pfObject, so each of these member functions of class pfObject are also
directly usable with objects of class pfvObject. This is also true for
ancestor classes of class pfObject.
void* pfObject::operator new(size_t);
void* pfObject::operator new(size_t, pfFluxMemory *fmem);
void pfObject::setUserData(void *data);
void pfObject::setUserData(int slot, void *data);
void* pfObject::getUserData(pfObject *obj);
void* pfObject::getUserData(pfObject *obj, int slot);
int pfObject::getNumUserData();
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfvObject can also be used with these
functions designed for objects of class pfMemory.
void* pfMemory::getData(const void *ptr);
pfType * pfMemory::getType();
int pfMemory::isOfType(pfType *type);
int pfMemory::isExactType(pfType *type);
const char * pfMemory::getTypeName();
int pfMemory::copy(pfMemory *src);
int pfMemory::compare(const pfMemory *mem);
void pfMemory::print(uint which, uint verbose, char *prefix,
FILE *file);
int pfMemory::getArena(void *ptr);
void* pfMemory::getArena();
int pfMemory::ref();
int pfMemory::unref();
Page 1
pfvObject(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
int pfMemory::unrefDelete();
int pfMemory::unrefGetRef();
int pfMemory::getRef();
int pfMemory::checkDelete();
int pfMemory::isFluxed();
void * pfMemory::getArena();
int pfMemory::getSize();
DESCRIPTION
The pfvObject class is a base class from which all pfvDisplayManager and
pfvViewer objects are derived. It supports the notion of being part of a
list of objects and has a name. This class should never be instantiated
directly.
new pfvObject creates and returns a handle to a pfvObject. This
constructor initializes the pfvObject's name to NULL.
Like other pfObjects, pfvObjects cannot be created statically,
automatically on the stack or in arrays, rather, they should be created
with the new operator, and deleted using pfDelete.
pfvObject::getName returns the pfvObjects's name.
pfvObject::setName sets the pfvObject's name to _name.
pfvObject::find searches for the object with the name _name in the list
specified by list. If a pfvObject is with the specified name exists in
the list, it is returned, otherwise the return value is NULL.
pfvObject::parseXml and pfvObject::setXmlField provide a framework for
configuring pfvObjects and derived classes through pfvXmlNodes and XML
configuration files.
pfvObject::parseXml must be passed a pointer to a pfvXmlNode, which is
assumed to be associated with the pfvObject. This xml node may have a
number of children tags. Each tag may contain a single string, or may
have other xml nodes as children.
The base class implementation of parseXml will go through each of the
children tags of pfvXmlNode xml, and call setXmlField for each one.
The base class implementation of setXmlField will only recognize an xml
node if its name is "name". The string value associated with such node
will be assigned to the pfvObject as its name.
An object derived from pfvObject will usually need to implement the
setXmlField but not parseXml. The setXmlField implementation of the
derived class should allow to configure objects attributes managed by the
derived class, and should pass unrecognized xml nodes to the setXmlField
implementation of the base class.
Page 2
pfvObject(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
This mechanism allows base class functionality to be extended (and only
optionally replaced) by derived classes.
setXmlField should return 1 if the xmlNode was properly handled, or 0 if
it was not.
SEE ALSO
pfvDisplayMngr, pfDispPipe, pfvDispPWin, pfvDispChan, pfvViewer, pfvView,
pfvWorld, pfvModule, pfvXml
Page 3