![]() |
nCine
2025.04.r498-9d36345
A cross-platform 2D game engine
|
Static RRTI and identification index. More...
#include <Object.h>
Public Types | |
enum class | ObjectType { BASE = 0 , TEXTURE , SHADER , SCENENODE , SPRITE , MESH_SPRITE , ANIMATED_SPRITE , PARTICLE , PARTICLE_SYSTEM , FONT , TEXTNODE , AUDIOBUFFER , AUDIOBUFFER_PLAYER , AUDIOSTREAM_PLAYER } |
Object types. | |
Public Member Functions | |
Object (ObjectType type) | |
Constructs an object with a specified type and adds it to the index. | |
Object (ObjectType type, const char *name) | |
Constructs an object with a specified type and name and adds it to the index. | |
virtual | ~Object () |
Removes an object from the index and then destroys it. | |
Object (Object &&other) | |
Move constructor. | |
Object & | operator= (Object &&other) |
Move assignment operator. | |
unsigned int | id () const |
Returns the object identification number. | |
ObjectType | type () const |
Returns the object type (RTTI) | |
const char * | name () const |
Returns the object name. | |
void | setName (const char *name) |
Sets the object name. | |
Static Public Member Functions | |
static ObjectType | sType () |
Static method to return class type. | |
template<class T > | |
static T * | fromId (unsigned int id) |
Returns a casted pointer to the object with the specified id, if any exists. | |
Static Public Attributes | |
static const unsigned int | MaxNameLength = 128 |
Maximum length for an object name. | |
Protected Member Functions | |
Object (const Object &other) | |
Protected copy constructor used to clone objects. | |
Protected Attributes | |
ObjectType | type_ |
Object type. | |
Static RRTI and identification index.