![]() |
VR-Forces 4.10 Class Documentation
|
DtEmbeddedEntityInfoManager is the central point for type-keyed data caching in the backend, such as configured Embedded Entities for a type, as well as tasks and sets that a given type is capable of performing. More...
Public Member Functions | |
| DtEmbeddedEntityInfoManager (DtSimManager *simManager) | |
| ~DtEmbeddedEntityInfoManager () | |
| virtual bool | init () |
| virtual bool | hasCachedDataFor (const DtObjectType &objType) const |
| Returns true if the info manager has data keyed to the given type. More... | |
| virtual bool | typeIsQueuedForUpdate (const DtObjectType &objType) const |
| Returns true if an info update has been queued for the given type. More... | |
| virtual const DtSimManager * | simManager () const |
| Get a const pointer to the simulation manager. More... | |
| virtual DtSimManager * | simManager () |
| Get a pointer to the simulation manager. More... | |
| virtual void | performCacheUpdates () |
| Performs updates for all types in myTypesToCache. More... | |
| virtual void | suspend () |
| Suspends the usage of this manager. Can be called when a scenario is closed. More... | |
| virtual void | resume () |
| Resumes the usage of this manager. Call after scenario is loaded to update scripts and send out updated information. More... | |
| virtual void | resetCache () |
| Resets the cache and cache request queue to initial emptiness. More... | |
| virtual std::string | toString () |
| Human-readable string form of the Info Manager's cache state, used for debugging. More... | |
| virtual const std::vector < DtEmbeddedEntity > | embeddedEntityListFor (const DtObjectType &objType) const |
| Returns copies of the cache vectors containing configured Embedded Entities, available sets, and available tasks for the given type. More... | |
| 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 |
| Returns true if this type should be checked for tasks/sets. More... | |
| virtual void | queueCacheUpdateFor (const std::vector< DtEmbeddedEntity > &entities, const DtVector &position) |
| Called internally by the info manager by performCacheUpdates() and processObjectAdded() More... | |
| virtual DtVrfObject * | createPrototypeObject (const DtObjectType &objType, const DtVector &position) |
| Called by performCacheUpdates() to create a short-lived object which is ticked once to prepare the object for populateCacheUsing() then deleted. More... | |
| virtual void | populateCacheUsing (const DtVrfObject *const obj, bool suppressRecursion) |
| Calls the various retrieve* methods, populates the caches, and optionally queues recursive lookups. More... | |
| virtual void | sendCacheResponseFor (const DtObjectType &requestedType) |
| Constructs and sends out the actual Cache Response. More... | |
| virtual std::vector < DtEmbeddedEntity > | retrieveEmbeddedEntityList (const DtVrfObject *const obj) |
| Methods that retrieve the applicable data from live(prototyped) objects. More... | |
| virtual std::vector < DtSetMessageType > | retrieveAvailableSets (const DtVrfObject *const obj) |
| virtual std::vector < DtSimTaskMessageType > | retrieveAvailableTasks (const DtVrfObject *const obj) |
| virtual void | addTaskBinding (const DtObjectType &objType, const DtSimTaskMessageType &taskType) |
| Helper methods for the processScriptUpdatedCallback. More... | |
| virtual void | removeTaskBinding (const DtObjectType &objType, const DtSimTaskMessageType &taskType) |
Protected Attributes | |
| DtSimManager * | mySimManager |
| std::map< DtObjectType, std::vector< DtEmbeddedEntity > > | myEmbeddedEntityListCache |
| std::map< DtObjectType, std::vector< DtSetMessageType > > | myAvailableSetsCache |
| std::map< DtObjectType, std::vector < DtSimTaskMessageType > > | myAvailableTasksCache |
| std::map< DtObjectType, DtVector > | myTypesToCache |
| DtPrintInfoCacheCommand * | myPrintInfoCacheCommand |
| bool | mySuspended |
Private Member Functions | |
| DtEmbeddedEntityInfoManager (const DtEmbeddedEntityInfoManager &orig) | |
| copy constructor - not implemented More... | |
| DtEmbeddedEntityInfoManager & | operator= (const DtEmbeddedEntityInfoManager &orig) |
| assignment operator - not implemented More... | |
| virtual void | processEeInfoCacheRequest (DtSimMessage *msg) |
| static void | eeInfoCacheRequestCallback (DtSimMessage *msg, void *usrData) |
| Handles responding to embedded entity list requests with list of embedded entity names and available tasks/sets associated with a given object type. More... | |
| virtual void | processObjectAdded (const DtVrfObject &obj) |
| static void | objectAddedCallback (const DtVrfObject *obj, void *usrData) |
| Processes added objects by calling populateCacheUsing() More... | |
| virtual void | processScriptUpdatedCallback (const DtScriptedTaskManagerCallbackInfo &info) |
| static void | scriptUpdatedCallback (const DtScriptedTaskManagerCallbackInfo &info, void *usrData) |
| Handles keeping the info cache in sync with scripted tasks. More... | |
DtEmbeddedEntityInfoManager is the central point for type-keyed data caching in the backend, such as configured Embedded Entities for a type, as well as tasks and sets that a given type is capable of performing.
| DtEmbeddedEntityInfoManager::DtEmbeddedEntityInfoManager | ( | DtSimManager * | simManager | ) |
| 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 occuring.
|
virtual |
Returns copies of the cache vectors containing configured Embedded Entities, available sets, and available tasks for the given type.
|
virtual |
|
virtual |
|
virtual |
Get a const pointer to the simulation manager.
|
virtual |
Get a pointer to the simulation manager.
|
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 |
|
virtual |
Human-readable string form of the Info Manager's cache state, used for debugging.
|
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 |
|
protectedvirtual |
|
protectedvirtual |
Calls the various retrieve* methods, populates the caches, and optionally queues recursive lookups.
|
staticprotected |
Processes added objects by calling populateCacheUsing()
|
protectedvirtual |
|
staticprotected |
Handles keeping the info cache in sync with scripted tasks.
|
protectedvirtual |
|
protectedvirtual |
Constructs and sends out the actual Cache Response.
Used by processEeInfoCacheRequest, and processScriptUpdatedCallback if necessary.
|
protectedvirtual |
Helper methods for the processScriptUpdatedCallback.
|
protectedvirtual |
|
private |
assignment operator - not implemented
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |