|
Public Member Functions |
void | RegisterType (const string &sClass, ProducerFunct t) |
| Factory Portion (this is called internally).
|
Node | Spawn (const string &sClass, const string &sName) |
| Spawn a new object of type sClass and name sName. If one already exists, don't make a new one.
|
Node | SpawnExplicit (const string &sClass, const string &sName) |
| Spawn a new object of type sClass and name sName. If one already exists, make a new one anyway.
|
void | Drop (NodeObject *nObject) |
| Remove nObject from the inventory.
|
void | Add (NodeObject *nObject) |
| Add nObject from the inventory.
|
Node | GetInstance (const string &sName) |
| Find the object named sName and return it. If not found, a Null node is returned.
|
NodeObject * | GetInstanceExp (const string &sName) |
| Same as GetInstance except don't Nodize it. Use of this function is discouraged.
|
void | RegisterForMessage (const string &sMessage, int iMessageID, Node nToRegister) |
| Register object nToRegister to the message sMessage so it receives iMessageID.
|
void | UnregisterForMessage (const string &sMessage, int iMessageID, Node nToRegister) |
| Undo previous registeration.
|
void | BroadcastMessage (const string &sMessage, const string &sPayload, Node nTarget) |
| Broadcast specific message to all listening objects.
|
void | PostMessage (const string &sMessage, const string &sPayload, Node nTarget, const float fTimeInFuture=0) |
| Post a message for future transmission to any then listening objects.
|
void | Update (const float fDtime) |
| Update the Node Manager, this is suggested to be called once per frame.
|
NodeObject * | DerefGet (const string &sType, const string &sName) |
| Like Spawn but doesn't return Node. Suggested you don't use this.
|
map< string, NodeObject * > * | GetObjectInstanceMap () |
| Return a map to all instances. It is suggested you allow this to be used internally, and don't use it, yourself.
|
Static Public Member Functions |
static NodeManager * | Instance () |
Private Attributes |
bool | m_bInit |
| Will always be zero on static-time init. (Used for static time initialization).
|
map< string, ProducerFunct > | m_mToMake |
| Map to all ProducerFunct's for how to make every known type of object.
|
map< string, NodeObject * > | m_mInstances |
| Map to all instances of all registered objects.
|
map< string, map< Node, int > > | m_mMessageMatches |
| Map to all possible messages.
|
vector< StringPair > | m_dImmediateMessages |
vector< StringPairFloat > | m_vFutureMessages |
| [Internal] List of all pending messages
|
double | m_fCurrentTime |
| Current time (From epoch).
|
Classes |
struct | StringPair |
| [Internal] Structure to hold all message data pairs. More...
|
struct | StringPairFloat |
| [Internal] Structure to hold all information regarding active, waiting messages. More...
|