Main Page   Modules   Class Hierarchy   Compound List   Compound Members  

GAUGE3D::GObject Class Reference

Base class objects with smart pointer and QueryInterface capabilities. More...

#include <gauge3d/stddefs.h>

Inherited by GAUGE3D::GCamera, GAUGE3D::GDirectory, GAUGE3D::GDisplay, GAUGE3D::GFile, GAUGE3D::GFileLoader, GAUGE3D::GImage, GAUGE3D::GIStream, GAUGE3D::GLibrary, GAUGE3D::GLight, GAUGE3D::GMessage, GAUGE3D::GMessageBox, GAUGE3D::GMessageQueue, GAUGE3D::GMessageQueue::Handler, GAUGE3D::GModel, GAUGE3D::GModel::AnimState, GAUGE3D::GModel::RenderInfo, GAUGE3D::GMutex, GAUGE3D::GObjectLoader, GAUGE3D::GOStream, GAUGE3D::GPlugin, GAUGE3D::GRawIStream, GAUGE3D::GRawOStream, GAUGE3D::GRenderer, GAUGE3D::GScene, GAUGE3D::GScheduler, GAUGE3D::GSprite, GAUGE3D::GSurface, GAUGE3D::GTexture, and GAUGE3D::GThread.

List of all members.

Public Types

typedef const char* tError
 An error identifier. More...


Public Methods

virtual ~GObject ()
tError Error ()
 Get the last error.

virtual void DoFrame (tTime time,tTime frameTime)
 Called by GScheduler every frame if the object requests it. More...

virtual void TimerCallback (tTime time)
 Called by GScheduler at a desired time. More...


Protected Methods

void Error (tError error)
 Set the last error.


Detailed Description

Base class objects with smart pointer and QueryInterface capabilities.

GObject is the base class for many, but not all, GAUGE classes. Using it adds several capabilities to the derived class:


Member Typedef Documentation

typedef const char * GAUGE3D::GObject::tError
 

An error identifier.

tError is an error identifier. In actuality, it is a const char* which points to a human-readable string. Every class which has error conditions should define these conditions as member variables of type static const tError. Then, to check which error occured, the caller can check the error identifier against each of these member variables. If it doesn't know how to handle the error, it can just output it to cerr or something since the error identifier points to a human-readable string.


Member Function Documentation

void GAUGE3D::GObject::DoFrame ( tTime time,
tTime frametime ) [virtual]
 

Called by GScheduler every frame if the object requests it.

Parameters:
time   The current time, in seconds. This is measured relative to a completely arbitrary point (usually the point when the engine was initialized).
frameTime   The amount of time which elapsed between the start of the previous frame and the start of this frame.

See GScheduler for more info on how to make it call this function every frame. Objects that don't need this functionality can ignore it.

Reimplemented in GAUGE3D::GInputMap, GAUGE3D::GMessageQueue, and GAUGE3D::GScheduler.

void GAUGE3D::GObject::TimerCallback ( tTime time ) [virtual]
 

Called by GScheduler at a desired time.

Parameters:
time   The current time. This will usually be a bit later than the time at which the object requested to be called back, but it will never be earlier.

See GScheduler for more info on how to make it call this function at a particular point in time. Objects that don't need this functionality can ignore it.


The documentation for this class was generated from the following file:
Generated at Tue Jan 30 17:07:34 2001 for gauge3d by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000