![]() |
VR-Forces 5.0.1 Developer's Guide
|
Manages all of the spawn points, sink points, and spawn templates in the current scenario.
Public Types | |
| typedef void(* | DtClearTemplateUUIDFunction )(void *userData) |
| typedef void(* | DtRefreshSpawnDataFunction )(void *userData) |
Public Member Functions | |
| DtSpawnSinkManager (DtSimulationServices *simManager, DtLocalObjectManager *) | |
| virtual | ~DtSpawnSinkManager () |
| virtual bool | init () |
| virtual bool | loadTemplates (const DtFilename &filename, bool sendUpdate=true) |
| virtual const DtRwSpawnDataList * | spawnTemplates () const |
| virtual DtRwSpawnData * | findSpawnDataByUUID (const DtUUID &uuid) |
| virtual void | updateSpawnSinkTemplates (const DtRwSpawnDataList &spawnDataList) |
| virtual void | preScenarioImport (DtScenario &scenario) |
| virtual void | postScenarioImport (const DtScenario &scenario) |
| virtual DtUUID | uuidForTemplateName (const DtString &templateName) const |
| virtual bool | addSpawnPoint (const DtUUID &templateUuid, const DtUUID &spawnPointUuid) |
| virtual void | removeSpawnPoint (const DtUUID &templateUuid, const DtUUID &spawnPointUuid) |
| virtual void | resetManagerTemplates (const DtRwSpawnDataList &templates, const DtFilename &templateFilename, bool sendUpdates=true) |
| virtual void | clearTemplates () |
| virtual void | sendSpawnListMessage (const DtSimulationAddress &recipient, bool initialSend=false) |
| virtual void | renameSpawnPoint (DtLocalObject *spawnEntity, const DtString &oldTemplateName, const DtString &newTemplateName) |
| virtual void | renameSinkPoint (DtLocalObject *spawnEntity, const DtString &oldTemplateName, const DtString &newTemplateName) |
| virtual void | removeSpawnTemplateAsParentOfSinkPoint (const DtUUID &templateUUID, const DtUUID &sinkPoint) |
| virtual void | addSpawnTemplateAsParentOfSinkPoint (const DtUUID &templateUUID, const DtUUID &sinkPoint) |
| virtual void | upgradeTemplates (const DtRwSpawnDataList &templates, bool andRename=false) |
| virtual void | removeNameMappings (const DtRwSpawnDataList &templates) |
| virtual void | resolveUnmatchedSpawnPoints () |
| virtual const DtRwSpawnDataList & | templates () |
| virtual void | addClearTemplateUUIDEntry (DtClearTemplateUUIDFunction fcn, void *userData) |
| virtual void | removeClearTemplateUUIDEntry (DtClearTemplateUUIDFunction fcn, void *userData) |
| virtual void | addRefreshSpawnDataEntry (DtRefreshSpawnDataFunction fcn, void *userData) |
| virtual void | removeRefreshSpawnDataEntry (DtRefreshSpawnDataFunction fcn, void *userData) |
| virtual DtUUID | uuidBasedOnName (const DtList &templateList, const DtString &) const |
| virtual void | processSimObjectDeleted (DtSimObjectReference ref) |
| virtual void | processAddSpawnPoint (const DtSimObject *object) |
| virtual void | addSpawnSinkPoint (DtSimObjectReference ref) |
Static Public Member Functions | |
| static void | preScenarioLoadCallback (DtScenario &scenario, void *usrData) |
| static void | preScenarioRewindCallback (void *usrData) |
| static void | preScenarioImportCallback (DtScenario &scenario, void *usrData) |
| static void | postScenarioImportCallback (const DtScenario &scenario, void *usrData) |
Protected Types | |
| typedef boost::unordered_map < DtUUID, DtUUID > | PointByTemplate |
| typedef std::map< DtString, DtUUID > | WaitingForSinkPoints |
| typedef void(* DtSpawnSinkManager::DtClearTemplateUUIDFunction)(void *userData) |
| typedef void(* DtSpawnSinkManager::DtRefreshSpawnDataFunction)(void *userData) |
|
protected |
|
protected |
| DtSpawnSinkManager::DtSpawnSinkManager | ( | DtSimulationServices * | simManager, |
| DtLocalObjectManager * | |||
| ) |
constructor
|
virtual |
destructor
|
virtual |
|
virtual |
Load spawn templates from scenario file.
|
virtual |
Accessor for spawn template list.
|
virtual |
|
virtual |
|
static |
Functions to load and save data to scenario files.
Callback function to initialize spawn templates in the manager from the scenario extras manager, which read them in. This copy is performed after scenario load, when the scenarios extras manager has finished.
|
static |
As above, but called after a rewind operation to reset the templates in this manager.
|
static |
When imported, read the extras file to get the scenario templates and rework ids for mappings.
|
virtual |
|
static |
Add in new templates to the current list.
|
virtual |
|
virtual |
|
virtual |
Returns true if added to the template.
|
virtual |
|
virtual |
This function is called by both the postScenarioLoad and postScenarioRewind callbacks to reset the templates in the manager. Existing templates are deleted, and then templates are copied from the scenario extras manager. If there are none, then the default templates are read from the settings file.
|
virtual |
|
static |
Message handlers.
Respond to a request for the names and descriptions of the templates in this manager's list.
|
virtual |
Message handlers.
Respond to a request for the names and descriptions of the templates in this manager's list.
|
static |
When a template list is received (and we are not the sender) and this is an initial send, replace the template list with the supplied list. This is so back-ends can maintain sync with the template list.
|
virtual |
When a template list is received (and we are not the sender) and this is an initial send, replace the template list with the supplied list. This is so back-ends can maintain sync with the template list.
|
virtual |
Sends a spawn list message (i.e., the names and descriptions of all the templates in the myTempate list) to the indicated address. Used in Request Spawn List processing.
|
static |
Respond to a request to add a sink point (by name) to a spawn template.
|
virtual |
Respond to a request to add a sink point (by name) to a spawn template.
|
static |
Respond to a request to send the spawn data for a given template.
|
virtual |
Respond to a request to send the spawn data for a given template.
|
static |
Respond to a request to update the data in a template.
|
virtual |
Respond to a request to update the data in a template.
|
static |
Respond to a request to create a template.
|
virtual |
Respond to a request to create a template.
|
static |
Respond to a request to delete a template.
|
virtual |
Respond to a request to delete a template.
|
virtual |
Respond to a notification that an object has been removed. The callback function is registered along with an object type code for sink points. If the sink point is on one of the template lists, it is removed from that list.
|
virtual |
Called when spawn point is added. If not local look up template and add to that. If template does not exist, wait for it.
|
virtual |
Respond to any object added. If we are waiting for this sink point, then process.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Create a UUID based on the name. This will not be random as this needs to be coordinated on multiple back-ends.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |