Public Member Functions |
| | DtScriptedTaskManager (DtSimManager *) |
| | CTOR.
|
| virtual | ~DtScriptedTaskManager () |
| | DTOR.
|
| virtual DtSimManager * | simManager () const |
| virtual void | addAdditionSystemScriptDirectory (const std::string &, bool send=true) |
| | Processes this system script directory and loads any meta data from that directory that is a system script into the manager.
|
| virtual void | removeAllSystemScriptedTasksFromDirectory (const std::string &, bool send=true) |
| | Removes all scripted tasks that appear in the supplied directory.
|
| virtual void | removeAllScenarioScripts (bool send=true) |
| | Removes all scripts that are loaded from the scenario. If send is true sends out a new list.
|
virtual const
ScriptedTasksByDirectory & | scriptedTasksByDirectory () const |
| | Returns the list of all scripted tasks by directory.
|
virtual const
ScriptedTaskMetaDataList & | scenarioScripts () const |
| | Returns a list of all the scripts assigned to the currently loaded scenario.
|
virtual const
ScriptedTaskMetaDataList & | allScriptsById () const |
| | Returns a list of all the scripts from system and scenario lists.
|
| virtual void | sendRequestedScripts (DtU32 responseId=0, const std::vector< std::string > &scriptIds=std::vector< std::string >(), bool sendScripts=false, bool sendUiLayout=false, const std::string &language="") |
| | Send out a list of all the scripts or the scripts that match the supplied ids, including script text if script text flag is true.
|
virtual const
DtScriptedTaskMetaData * | lookupScriptById (const DtGenericMessageType &scriptId) const |
| | Looks up a scripted task data by script id.
|
virtual const
DtScriptedTaskMetaData * | lookupScriptById (const DtSetMessageType &scriptId) const |
virtual const
DtScriptedTaskMetaData * | lookupScriptById (const DtSimTaskMessageType &scriptId) const |
virtual const
DtScriptedTaskMetaData * | lookupScriptById (const std::string &) const |
| virtual void | modifyScenarioScriptedTask (const DtScriptedTaskMetaData &, const std::string &sourceScriptId="", bool send=true, bool keepScriptInMessage=false, bool keepLayoutInMessage=false) |
| | If the scripted task does not exist adds it either as a scenario script, else modified the script.
|
| virtual bool | removeScriptedTask (const std::string &id, bool send=true, bool scenarioOnly=true, bool removeSystemScriptFromDisk=false) |
| | Removes the current script and sends out a message that the specified script has been removed.
|
| virtual bool | loadScenarioScripts (const DtFilename &, bool send=true) |
| | Loads the scenario scripts from the specified file. If send is true sends out all scripts onto the network.
|
| virtual bool | loadScenarioScriptsFromZipFile (const DtFilename &scenarioZipFile, const std::string &, bool send=true) |
| virtual bool | loadScenarioScripts (const std::string &str, bool send=true) |
| | Loads the scenario scripts from the given string.
|
| virtual bool | writeScenarioScripts (const DtFilename &) |
| | Writes the local scenario scripts to the specified file.
|
| virtual bool | writeScenarioScripts (std::string &) |
| | Writes the local scenario scripts to the specified string.
|
| virtual bool | removeScriptById (const std::string &s, bool scenarioOnly=true, bool removeSystemScriptFromDisk=false) |
| | Removes script by id and replaces with a like id item from another source if it exists.
|
| virtual void | setSimulationModelSetScriptsDirectory (const std::string &s, bool send=true) |
| | Sets the current simulation model set directory.
|
| virtual std::string | simulationModelSetScriptsDirectory () const |
| | Gets the current simulation model set directory.
|
virtual std::vector
< DtSimTaskMessageType > | tasksValidFor (const DtEntityType &, int force) const |
| | Returns a list of all scripted task ids that are valid for the given entity type and force (by doctrine).
|
virtual std::vector
< DtSetMessageType > | setsValidFor (const DtEntityType &, int force) const |
| | Returns a list of all scripted set ids that are valid for the given entity type and force (by doctrine).
|
virtual std::vector
< DtSimTaskMessageType > | reactiveTasksValidFor (const DtEntityType &, int force) const |
| | Returns a list of all reactive task ids that are valid for the given entity type and force (by doctrine).
|
| virtual std::vector< std::string > | scriptsValidFor (const DtEntityType &, int scriptType, int force) const |
| | Returns a list of all task ids that are valid for the given entity type and script type and force (by doctrine).
|
| virtual void | reportError (const DtGenericMessageType &scriptId, const std::string &error, bool sendReport=true) |
| | Assigns error to script.
|
| virtual void | reportError (const DtSimTaskMessageType &scriptId, const std::string &error, bool sendReport=true) |
| virtual void | reportError (const DtSetMessageType &scriptId, const std::string &error, bool sendReport=true) |
| virtual void | reportError (const std::string &scriptId, const std::string &error, bool sendReport=true) |
| virtual std::string | findSystemDirectoryFor (const std::string &scriptId) const |
| | Given the script id finds the place where it was originally loaded from or the current main system script directory.
|
| virtual void | clearError (const DtGenericMessageType &scriptId) |
| | Clears out any existing error. Will not send a message, but, rather clears out error variable.
|
| virtual void | clearError (const DtSimTaskMessageType &scriptId) |
| virtual void | clearError (const DtSetMessageType &scriptId) |
| virtual void | clearError (const std::string &scriptId) |
| virtual int | scriptType (const DtGenericMessageType &scriptId) const |
| | Returns the type of script for the given script id. If no script with that id is present returns -1.
|
| virtual int | scriptType (const DtSetMessageType &scriptId) const |
| virtual int | scriptType (const DtSimTaskMessageType &scriptId) const |
| virtual int | scriptType (const std::string &) const |
| virtual DtGenericMessageType | remapScriptId (const DtGenericMessageType &scriptId) const |
| | Remaps the script id from a possible original to an alias.
|
| virtual DtSetMessageType | remapScriptId (const DtSetMessageType &scriptId) const |
| virtual DtSimTaskMessageType | remapScriptId (const DtSimTaskMessageType &scriptId) const |
| virtual std::string | remapScriptId (const std::string &scriptId) const |
| virtual void | merge (DtScriptedTaskManager *mgr, std::vector< DtRwTranslatableStringObject > &) |
| | Merges the supplied scripted tasks (scenario level only!) into this manager.
|
| virtual DtScriptResourceManager * | resourceManager (const DtString &type) |
| | Returns the central resource manager for scripts of the given type.
|
virtual
DtScriptResourceManagerMap & | resourceManagers () |
| | Returns all of the central resource managers for scripts of the given type.
|
|
| virtual void | addScriptedTaskChangedCallback (DtScriptedTaskManagerCallbackFcn fcn, void *usr) |
| | Callback that is invoked whenever a scripted task changes.
|
| virtual void | removeScriptedTaskChangedCallback (DtScriptedTaskManagerCallbackFcn fcn, void *usr) |
|
| virtual void | addSample (const DtGenericMessageType &scriptId, double sample) |
| | Code to support frame rate sampling and reporting for scripted tasks Adds a frame rate sample for the given script id.
|
| virtual void | addSample (const DtSetMessageType &scriptId, double sample) |
| virtual void | addSample (const DtSimTaskMessageType &scriptId, double sample) |
| virtual void | addSample (const std::string &scriptId, double sample) |
| virtual void | monitor (const std::string &scriptId, bool) |
| | Adds 1 to the number of monitors on the particular script id if true, remove 1 if false.
|
| virtual void | setMonitorTime (double) |
| | Sets the time to update the network with frame rates if anything is being monitored.
|
| virtual void | addFrameRateReference (const DtGenericMessageType &) |
| | Adds a reference for this script that something is adding to its frame rate averages.
|
| virtual void | addFrameRateReference (const DtSimTaskMessageType &) |
| virtual void | addFrameRateReference (const DtSetMessageType &) |
| virtual void | addFrameRateReference (const std::string &) |
| virtual void | removeFrameRateReference (const DtGenericMessageType &scriptId) |
| | Removes a frame rate reference. If no more references removes averager.
|
| virtual void | removeFrameRateReference (const DtSetMessageType &scriptId) |
| virtual void | removeFrameRateReference (const DtSimTaskMessageType &scriptId) |
| virtual void | removeFrameRateReference (const std::string &) |
|
| virtual void | setDoctrines (const std::set< std::string > &) |
| virtual void | addDoctrine (const std::string &, bool send=true) |
| virtual bool | removeDoctrine (const std::string &, bool send=true) |
| | Return true if scripts have changed.
|
virtual const std::set
< std::string > & | doctrines () const |
| virtual void | clearDoctrines (bool send=true) |
| virtual void | loadDoctrines (const DtFilename &f, bool send=true) |
| virtual void | sendDoctrines () |
| virtual void | sendDoctrineAssignments () |
| virtual void | updateDoctrines (const DtScriptedTaskMetaData &) |
| virtual void | saveDoctrines (const DtFilename &f) const |
| virtual ScriptedTaskMetaDataList | scriptsValidForDoctrine (const std::string &) const |
| virtual std::string | doctrineForForce (int) const |
| virtual void | setDoctrineForForce (const std::string &, int) |
| virtual void | setDoctrineAssignments (const std::map< int, std::string > &) |
| virtual void | setLanguage (const DtString &) |
| | Set the language to send out on any request that does not have a language specified.
|
| const DtString & | language () const |
| virtual bool | renameDoctrine (const std::string &from, const std::string &to, bool send=true) |
| | Return true if scripts have changed.
|
Protected Member Functions |
| virtual void | processRequestScriptedTasks (DtSimMessage *) |
| virtual bool | loadScenarioScripts (std::istream &ifs, bool send) |
| virtual void | processScriptedTaskOperation (DtSimMessage *) |
| virtual void | processDoctrinesOperation (DtSimMessage *) |
| virtual void | makeSystemScript (const std::string &) |
| | Moves the specified script from a scenario to system script.
|
| virtual void | modifySystemScript (const std::string &scriptid, const std::string &) |
| | Modifies the system script.
|
| virtual void | modifySystemLayout (const std::string &scriptid, const std::string &) |
| | Modifies the system ui layout.
|
| virtual void | modifySystemScriptedTask (const DtScriptedTaskMetaData &, const std::string &sourceSciptId="", bool send=true) |
| | Modifies the system script meta data.
|
| virtual void | modifyScript (const std::string &id, const std::string &script) |
| | Modifies the scenario script.
|
| virtual void | modifyLayout (const std::string &id, const std::string &script) |
| | Modifies the scenario ui layout.
|
| virtual bool | changeScriptScriptId (const DtIfScriptedTaskOperation &, bool &needsCompleteResend) |
| | Changes the scenario script script id from the original to the new id. Returns true if old id is found.
|
| virtual void | addTaskToTaskFactory (const std::string &id) |
| | Adds a task into the task factory by the given script id.
|
| virtual void | removeTaskFromTaskFactory (const std::string &id) |
| | Removes a task from the task factory by the given task id.
|
| virtual void | addSetToSetFactory (const std::string &id) |
| | Adds a set into the set factory by the given script id.
|
| virtual void | removeSetFromSetFactory (const std::string &id) |
| | Removes a set from the set factory by the given task id.
|
| virtual void | signalNewScriptedTask (const std::string &) |
| | Invokes callbacks for a new scripted task.
|
| virtual void | loadDefaultScript (DtScriptedTaskMetaData &) |
| | Loads the default script into the supplied meta data.
|
| virtual void | loadDefaultUiLayout (DtScriptedTaskMetaData &) |
| | Loads the default ui layout into the supplied meta data.
|
| virtual void | tick () |
| virtual void | sendMonitorInformation () |
| | Sends frame rate information for all monitored items.
|
| virtual void | updateScenarioScripts (std::map< std::string, DtScriptedTaskMetaData > &, bool send) |