![]() |
VR-Forces 5.0.3 Developer's Guide
|
DtEmbeddedEntityInfoManager is the central point for information about embedded entities and their capabilities. It maintains type-keyed data caching in the backend, which is used to look up configured Embedded Entities for a specified object type, as well as tasks and sets that a given embedded entity type is capable of performing.
Public Member Functions | |
| DtEmbeddedEntityInfoManager (DtSimulationServices *simManager, DtLocalObjectManager *) | |
| ~DtEmbeddedEntityInfoManager () | |
| virtual bool | init () |
| virtual bool | hasCachedDataFor (const DtObjectType &objType) const |
| virtual bool | typeIsQueuedForUpdate (const DtObjectType &objType) const |
| virtual void | performCacheUpdates () |
| virtual void | suspend () |
| virtual void | resume () |
| virtual void | resetCache () |
| virtual std::string | toString () |
| virtual void | tick () |
| virtual const std::vector < DtEmbeddedEntity > | embeddedEntityListFor (const DtObjectType &objType) const |
| virtual const std::vector < DtSetMessageType > | availableSetsFor (const DtObjectType &objType) const |
| virtual const std::vector < DtSimTaskMessageType > | availableTasksFor (const DtObjectType &objType) const |
Protected Member Functions | |
| virtual bool | isCachableType (const DtObjectType &) const |
| virtual void | queueCacheUpdateFor (const std::vector< DtEmbeddedEntity > &entities, const DtVector &position) |
| virtual DtLocalObject * | createPrototypeObject (const DtObjectType &objType, bool &created) |
| virtual void | populateCacheUsing (const DtLocalObject *const obj, bool suppressRecursion) |
| virtual void | sendCacheResponseFor (const DtObjectType &requestedType) |
| virtual bool | cannotBeEmbedded (const DtLocalObject &) const |
| virtual void | cachePrototype (const DtObjectType &objType) |
| virtual std::vector < DtEmbeddedEntity > | retrieveEmbeddedEntityList (const DtLocalObject *const obj) |
| virtual std::vector < DtSetMessageType > | retrieveAvailableSets (const DtLocalObject *const obj) |
| virtual std::vector < DtSimTaskMessageType > | retrieveAvailableTasks (const DtLocalObject *const obj) |
| virtual void | processObjectAdded (const DtLocalObject &obj) |
| virtual void | addTaskBinding (const DtObjectType &objType, const DtSimTaskMessageType &taskType) |
| virtual void | removeTaskBinding (const DtObjectType &objType, const DtSimTaskMessageType &taskType) |
Protected Attributes | |
| DtSimulationServices * | mySimulationServices |
| DtLocalObjectManager * | myObjectManager |
| std::vector< DtLocalObject * > | myPrototypesToDelete |
| std::map< DtObjectType, std::vector< DtEmbeddedEntity > > | myEmbeddedEntityListCache |
| std::map< DtObjectType, std::vector< DtSetMessageType > > | myAvailableSetsCache |
| std::map< DtObjectType, std::vector < DtSimTaskMessageType > > | myAvailableTasksCache |
| std::set< DtObjectType > | myTypesToCache |
| DtPrintInfoCacheCommand * | myPrintInfoCacheCommand |
| tbb::spin_rw_mutex | myMutex |
| bool | mySuspended |
Private Member Functions | |
| DtEmbeddedEntityInfoManager (const DtEmbeddedEntityInfoManager &orig) | |
| DtEmbeddedEntityInfoManager & | operator= (const DtEmbeddedEntityInfoManager &orig) |
| virtual void | processEeInfoCacheRequest (DtSimMessage *msg) |
| static void | eeInfoCacheRequestCallback (DtSimMessage *msg, void *usrData) |
| virtual void | processScriptUpdatedCallback (const DtScriptedTaskManagerCallbackInfo &info) |
| static void | scriptUpdatedCallback (const DtScriptedTaskManagerCallbackInfo &info, void *usrData) |
| DtEmbeddedEntityInfoManager::DtEmbeddedEntityInfoManager | ( | DtSimulationServices * | simManager, |
| DtLocalObjectManager * | |||
| ) |
| DtEmbeddedEntityInfoManager::~DtEmbeddedEntityInfoManager | ( | ) |
|
private |
copy constructor - not implemented
|
virtual |
|
virtual |
Returns true if the info manager has data keyed to the given type.
|
virtual |
Returns true if an info update has been queued for the given type. The updates are performed near the end of the current tick, thus this is used to keep duplicated discoveries from occurring.
|
virtual |
Returns copies of the cache vectors containing configured Embedded Entities, available sets, and available tasks for the given type.
|
virtual |
Returns copies of the cache vectors containing configured Embedded Entities, available sets, and available tasks for the given type.
|
virtual |
Returns copies of the cache vectors containing configured Embedded Entities, available sets, and available tasks for the given type.
|
virtual |
Performs updates for all types in myTypesToCache. Should be called just before the object manager performs queued deletions.
|
virtual |
Suspends the usage of this manager. Can be called when a scenario is closed.
|
virtual |
Resumes the usage of this manager. Call after scenario is loaded to update scripts and send out updated information.
|
virtual |
Resets the cache and cache request queue to initial emptiness. Should only be called by DtCgf/StSimManager on scenario load/close.
|
static |
Handles responding to embedded entity list requests with list of embedded entity names and available tasks/sets associated with a given object type.
|
virtual |
Handles responding to embedded entity list requests with list of embedded entity names and available tasks/sets associated with a given object type.
|
virtual |
Human-readable string form of the Info Manager's cache state, used for debugging.
|
virtual |
Deletes prototypes.
|
protectedvirtual |
Returns true if this type should be checked for tasks/sets.
|
protectedvirtual |
Called internally by the info manager by performCacheUpdates() and processObjectAdded()
|
protectedvirtual |
Called by performCacheUpdates() to create a short-lived object which is ticked once to prepare the object for populateCacheUsing() then deleted.
|
protectedvirtual |
Methods that retrieve the applicable data from live(prototyped) objects. Note that these methods do not themselves interact with the caches in any way.
|
protectedvirtual |
Methods that retrieve the applicable data from live(prototyped) objects. Note that these methods do not themselves interact with the caches in any way.
|
protectedvirtual |
Methods that retrieve the applicable data from live(prototyped) objects. Note that these methods do not themselves interact with the caches in any way.
|
protectedvirtual |
Calls the various retrieve* methods, populates the caches, and optionally queues recursive lookups.
|
protectedvirtual |
Processes added objects by calling populateCacheUsing()
|
staticprotected |
Handles keeping the info cache in sync with scripted tasks.
|
protectedvirtual |
Handles keeping the info cache in sync with scripted tasks.
|
protectedvirtual |
Constructs and sends out the actual Cache Response. Used by processEeInfoCacheRequest, and processScriptUpdatedCallback if necessary.
|
protectedvirtual |
Helper methods for the processScriptUpdatedCallback.
|
protectedvirtual |
Helper methods for the processScriptUpdatedCallback.
|
protectedvirtual |
|
protectedvirtual |
|
private |
assignment operator - not implemented
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |