This is the base class, used as a parent for most engine classes (such as WObject, WImage, etc...). It provides a unified way of managing objects such that they all have IDs, names, managers, and can be freed using reference counting. Initially, a WBase has a reference count of 1. If the count ever reaches 0, the object will delete itself. So an application should NEVER delete or free an object that inherits from WBase, but should simply call its RemoveReference() instead.
| virtual std::string WBase::GetTypeName |
( |
| ) |
const |
|
pure virtual |
This function must be implemented by a child class. This is used for debugging, in which a class should return its name.
- Returns
- The name of the class
Implemented in WEffect, WShader, WParticles, WGeometry, WObject, WAnimation, WOpenALSound, WImage, WMaterial, WSprite, WLight, WRenderTarget, WCamera, WTerrain, and WBulletRigidBody.
| virtual bool WBase::Valid |
( |
| ) |
const |
|
pure virtual |
Must be implemented by the child. This function should report the validity status of the object, in whatever sense of "validity" it chooses.
- Returns
- true if the object is "valid", false otherwise
Implemented in WEffect, WGeometry, WShader, WParticles, WObject, WImage, WCamera, WRenderTarget, WSprite, WLight, WMaterial, WTerrain, WBulletRigidBody, WOpenALSound, WPhysicsAction, WSkeleton, WConstraint, and WRigidBody.