SimPersistID
Engine/source/console/simPersistID.h
A globally unique persistent ID for a SimObject.
Public Types
Parent
Protected Types
LookupTableType
Public Friends
class
Protected Attributes
The UUID assigned to the object. Never changes.
Protected Static Attributes
Table of persistent object IDs.
Protected Functions
SimPersistID(const Torque::UUID & uuid)
Construct a persistent ID stub for the given unique identifier.
SimPersistID(SimObject * object)
Construct a new persistent ID for "object" by generating a fresh unique identifier.
Protected Static Functions
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.
findOrCreate(const Torque::UUID & uuid)
Look up a persistent ID by its UUID.
Public Functions
getUUID()
Return the UUID bound to this PID.
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.
Protected Functions
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()
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.
