SimPersistID

Engine/source/console/simPersistID.h

A globally unique persistent ID for a SimObject.

More...

Public Types

Parent 

Protected Types

LookupTableType 

Public Friends

class

Protected Attributes

Reference to the SimObject.

The UUID assigned to the object. Never changes.

Protected Static Attributes

Table of persistent object IDs.

Public Functions

Construct a persistent ID stub for the given unique identifier.

Construct a new persistent ID for "object" by generating a fresh unique identifier.

Return the object that is bound to this PID.

Return the UUID bound to this PID.

Protected Functions

resolve(SimObject * object)

Bind this unresolved PID to the given object.

Protected Static Functions

create(SimObject * object)

Create a persistent ID for the given object.

Public Static Functions

Look up a persistent ID by its UUID. Return NULL if no PID is bound to the given UUID.

Find a SimObject by the UUID assigned to its PID.

Look up a persistent ID by its UUID.

init()

Initialize the persistent ID system.

Uninitialize the persistent ID system.

Detailed Description

A globally unique persistent ID for a SimObject.

Public Types

typedef void Parent 

Protected Types

typedef HashTable< Torque::UUID, SimPersistID * > LookupTableType 

Public Friends

Protected Attributes

SimObject * mObject 

Reference to the SimObject.

Will be NULL for as long as the persistent ID is not resolved.

Torque::UUID mUUID 

The UUID assigned to the object. Never changes.

Protected Static Attributes

LookupTableType * smLookupTable 

Table of persistent object IDs.

Public Functions

SimPersistID()

SimPersistID(const Torque::UUID & uuid)

Construct a persistent ID stub for the given unique identifier.

The stub remains not bound to any object until it is resolved.

SimPersistID(SimObject * object)

Construct a new persistent ID for "object" by generating a fresh unique identifier.

~SimPersistID()

DECLARE_CLASS(SimPersistID , EngineObject )

getObject()

Return the object that is bound to this PID.

If the PID has not yet been resolved, return NULL.

getUUID()

Return the UUID bound to this PID.

Protected Functions

resolve(SimObject * object)

Bind this unresolved PID to the given object.

unresolve()

Protected Static Functions

create(SimObject * object)

Create a persistent ID for the given object.

Public Static Functions

find(const Torque::UUID & uuid)

Look up a persistent ID by its UUID. Return NULL if no PID is bound to the given UUID.

findObjectByUUID(const Torque::UUID & uuid)

Find a SimObject by the UUID assigned to its PID.

Return NULL if either no PID is bound to the given UUID or if the PID bound to it is not yet resolved.

findOrCreate(const Torque::UUID & uuid)

Look up a persistent ID by its UUID.

If no PID is bound to the given UUID yet, create a new PID and bind it to the UUID.

init()

Initialize the persistent ID system.

shutdown()

Uninitialize the persistent ID system.