Tools.h++ Class Reference

Table Of Contents
Public Member Functions
void
addFunction(RWuserCreator uc, RWClassID id);
Adds to the RWFactory the global function pointed to by uc, which creates an instance of
an object with RWClassID id.
void
addFunction(RWuserCreator uc, RWClassID id, RWStringID sid);
Adds to the RWFactory the global function pointed to by uc, which creates an instance of
an object with RWClassID id and RWStringID sid.
RWCollectable*
create(RWClassID id) const;
Allocates a new instance of the class with RWClassID id off the heap and returns a
pointer to it. Returns nil if id does not exist. Because this instance is allocated off the
heap, you are responsible for deleting it when done.
RWCollectable*
create(RWString sid) const;
Allocates a new instance of the class with RWStringID sid off the heap and returns a
pointer to it. Returns nil if sid does not exist. Because this instance is allocated off the
heap, you are responsible for deleting it when done.
RWuserCreator
getFunction(RWClassID id) const;
Returns from the RWFactory a pointer to the global function associated with RWClassID
id. Returns nil if id does not exist.
RWuserCreator
getFunction(RWStringID sid) const;
Returns from the RWFactory a pointer to the global function associated with
RWStringID sid. Returns nil if sid does not exist.
void
removeFunction(RWClassID id);
Removes from the RWFactory the global function associated with RWClassID id. If id
does not exist in the factory, no action is taken.
void
removeFunction(RWStringID sid);
Removes from the RWFactory the global function associated with RWStringID sid. If sid
does not exist in the factory, no action is taken.
RWStringID
stringID(RWClassID id) const;