Compounds | |
class | GAUGE3D::GArray |
class | GAUGE3D::GStridedArray |
class | GAUGE3D::GException |
class | GAUGE3D::GString |
class | GAUGE3D::GSmartPointer |
class | GAUGE3D::GObject |
Support macros for QueryInterface. | |
#define | GAUGE3D_SET_UID(HIGH,MID,LOW) |
Set the UID for a class. More... | |
#define | GAUGE3D_DECLARE_INTERFACES(CLASSNAME) |
Begin interface declaration block for a class. More... | |
#define | GAUGE3D_DECLARE_BASECLASS(BASECLASSNAME) |
Declare inherited interfaces for a class. More... | |
#define | GAUGE3D_DECLARE_EMBEDDED_INTERFACE(INTERFACE_OBJECT) |
Declare embedded interfaces for a class. More... | |
#define | GAUGE3D_END_INTERFACES |
End interface declaration block. More... | |
PI definitions | |
To avoid ambiguities in pi constants, we define both PI and M_PI. | |
#define | M_PI 3.14159265358979323846 |
pi. | |
#define | M_PI_2 1.57079632679489661923 |
pi/2. | |
#define | M_PI_4 0.78539816339744830962 |
pi/4. | |
#define | PI 3.14159265358979323846 |
pi. | |
#define | PI_2 1.57079632679489661923 |
pi/2. | |
#define | PI_4 0.78539816339744830962 |
pi/4. | |
Standard types | |
Some of these will be different on some systems. | |
typedef unsigned int | uint |
unsigned int. | |
typedef unsigned short | ushort |
unsigned short. | |
typedef unsigned long | ulong |
unsigned long. | |
typedef unsigned char | uchar |
unsigned char. | |
typedef char | int8 |
8-bit signed integer. | |
typedef short | int16 |
16-bit signed integer. | |
typedef int | int32 |
32-bit signed integer. | |
typedef long long | int64 |
64-bit signed integer. | |
typedef unsigned char | uint8 |
8-bit unsigned integer. | |
typedef unsigned short | uint16 |
16-bit unsigned integer. | |
typedef unsigned int | uint32 |
32-bit unsigned integer. | |
typedef unsigned long long | uint64 |
64-bit unsigned integer. | |
typedef float | float32 |
32-bit floating point number. | |
typedef double | float64 |
64-bit floating point number. | |
typedef double | tTime |
Time value, measured in seconds. More... | |
Defines | |
#define | GAUGE3D_FATAL_ERROR(CAUSE) |
Abort execution due to a fatal error. More... | |
Typedefs | |
typedef GSmartPointer<GObject> | pGObject |
Smart pointer to a GObject. | |
Functions | |
template<class tType> GSmartPointer<tType> | QueryInterface (pGObject object) |
See if an object supports a particular interface. More... |
This module is used by every class in GAUGE. It includes stddefs.h, which must be included by every GAUGE source file. It also includes the memory allocator, GSmartPointer, GObject, GArray, GString, etc.
|
Initializer: \ throw GAUGE3D::GException(CAUSE, __FILE__, __LINE__);
|
|
Initializer: \ public: \ enum {_UID_HIGH = HIGH, _UID_MID = MID, _UID_LOW = LOW}; \ virtual pGObject _QueryInterface(uint32 high, uint32 mid, uint32 low);\ private: GAUGE3D_SET_UID should be used in the definition for any class that is derived from GObject. The numbers are the high, middle, and low 32-bit integers in the 96-bit GAUGE unique identifier for the class. (use gauge3d-uidgen to create them) |
|
Initializer: \ pGObject CLASSNAME::_QueryInterface(uint32 high, uint32 mid, uint32 low)\ { \ pGObject ret; \ if((high == _UID_HIGH) && (mid == _UID_MID) && (low == _UID_LOW)) \ return this; GAUGE3D_DECLARE_INTERFACES should appear in the cpp file for any class that uses GAUGE3D_SET_UID. It should be followed by a GAUGE3D_DECLARE_BASECLASS for each base class (but not base class's base classes, etc.) and a GAUGE3D_DECLARE_EMBEDDED_INTERFACE for every embedded interface. These should preferably be ordered with the most likely requested interface on top. After all of these, GAUGE3D_END_INTERFACES should be used. |
|
Initializer: \ if((ret = BASECLASSNAME::_QueryInterface(high, mid, low)) != NULL)\ return ret; GAUGE3D_DECLARE_BASECLASS declares direct base classes. Not the base classes of base classes, just direct inherited classes. So, if you are not using multiple inheritance, you should never need more than one of these. |
|
Initializer: \ if((ret = (INTERFACE_OBJECT)._QueryInterface(high, mid, low)) != NULL)\ return ret; GAUGE3D_DECLARE_EMBEDDED_INTERFACE declares interfaces from which this class is not inherited, but which define additional functionality that this class has. The parameter should be an actual instantiated copy of the interface, not the classname of it. This is because that interface's QueryInterface function needs to be called. |
|
Initializer: \ return ret; \ } Place GAUGE3D_END_INTERFACES after all you interface declarations. |
|
Time value, measured in seconds.
The time from which this value mesures is completely arbitrary, but will be the same for all tTime values during a particular run of the engine. If you want to get the date, use the ANSI-C functions created for this purpose. |
|
See if an object supports a particular interface.
For example, if you had an object of type GObject and you wanted to see if it was a GFile, you would do this: QueryInterface<GFile>(myObject); This function would be a member of GObject, but MSVC doesn't like templated member functions. |