![]() |
VR-Forces Developer's Guide
|
The Master DtVrfScriptedTaskManager. The scripted task manager will be responsible for maintaining the list of currently available scripted tasks.

Classes | |
| struct | PreservedScript |
| struct | ScenarioSystemPair |
| struct | ScriptedTaskDialogInformation |
Public Types | |
| typedef std::map< int, makVrv::DtUnicode > | ScriptedTaskTypeNames |
| typedef std::map< bool, std::string > | IconType |
| typedef std::map< int, std::string > | DoctrinesByForce |
| typedef std::map< int, ScriptedTaskDialogInformation > | ScriptedTaskTypeInformation |
| typedef std::map< std::string, ScenarioSystemPair > | ScriptedTasks |
| typedef std::pair< std::string, bool > | ActionCategory |
| typedef std::set< std::string > | Doctrines |
| typedef std::map< std::string, ActionCategory > | ActionCategories |
| typedef std::map< std::string, PreservedScript > | PreservedScripts |
Public Member Functions | |
| DtVrfScriptedTaskManager (makVrv::DtDe &) | |
| virtual | ~DtVrfScriptedTaskManager () |
| virtual void | clear (bool andSetting=true, bool reset=true, bool signal=true) |
| virtual void | removeScriptedTaskMetaData (const std::string &scriptedTaskId, bool signal=true) |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtSimTaskMessageType &scriptId, bool system) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtSetMessageType &scriptId, bool system) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const std::string &scriptId, bool system) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtGenericMessageType &scriptId, bool system) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtSimTaskMessageType &scriptId) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtSetMessageType &scriptId) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtGenericMessageType &scriptId) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const std::string &scriptId) const |
| virtual bool | doesNotHaveSMSLoaded (const DtScenarioExplorer &) const |
| virtual void | addScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, bool addScript=false, bool addLayout=false) |
| virtual void | duplicateScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, const std::string &sourceId) |
| virtual void | updateScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, const std::string &originalId="") |
| virtual void | deleteScriptedTaskMetaData (const std::string &) |
| virtual void | addScriptedTaskMetaData (const DtScriptedTaskMetaData &, bool signal=true) |
| virtual void | requestScriptedTasks (const std::vector< std::string > &scripts=std::vector< std::string >()) |
| virtual void | loadScripts (const DtScenarioExplorer &explorer) |
| virtual bool | isSystemScript (const DtSimTaskMessageType &) const |
| virtual bool | isSystemScript (const DtSetMessageType &) const |
| virtual bool | isSystemScript (const std::string &) const |
| virtual bool | hasSystemScript (const DtSimTaskMessageType &) const |
| virtual bool | hasSystemScript (const DtSetMessageType &) const |
| virtual bool | hasSystemScript (const std::string &) const |
| virtual bool | appearsOnMenu (const std::string &) const |
| virtual bool | appearsOnToolbar (const std::string &) const |
| virtual bool | systemScriptAvailable (const std::string &) const |
| virtual void | setSystemScriptAvailable (const std::string &id, bool) |
| virtual void | removeSystemScript (const std::string &id, bool signal=true) |
| virtual const ScriptedTasks & | scriptedTaskMetaData () const |
| virtual std::string | remapMenuPath (std::string originalPath) const |
| virtual bool | hasScriptedTaskMetaData (const DtSimTaskMessageType &) const |
| virtual bool | hasScriptedTaskMetaData (const DtSetMessageType &) const |
| virtual bool | hasScriptedTaskMetaData (const std::string &) const |
| virtual bool | hasScenarioScriptedTaskMetaData (const DtSimTaskMessageType &) const |
| virtual bool | hasScenarioScriptedTaskMetaData (const DtSetMessageType &) const |
| virtual bool | hasScenarioScriptedTaskMetaData (const std::string &) const |
| virtual bool | hasSystemScriptedTaskMetaData (const DtSimTaskMessageType &) const |
| virtual bool | hasSystemScriptedTaskMetaData (const DtSetMessageType &) const |
| virtual bool | hasSystemScriptedTaskMetaData (const std::string &) const |
| virtual bool | hasDoctrine (const std::string &) const |
| virtual std::string | uniqueScriptIdFrom (const std::string &, int scriptType, std::set< std::string > additionalToCheck=std::set< std::string >()) const |
| virtual void | makeSystemScript (const std::string &) |
| virtual void | assignScriptError (const std::string &scriptId, const std::string &error) |
| virtual void | clearScriptError (const std::string &scriptId) |
| virtual bool | scriptHasError (const std::string &scriptId, std::string *error=0) const |
| virtual bool | scriptIsModified (const std::string &scriptId) const |
| virtual void | setScriptModified (const std::string &scriptId, bool) |
| virtual void | clearModifiedScripts () |
| virtual void | setScript (const std::string &scriptId, const std::string &script, bool setAsModified=true) |
| virtual void | setUiLayout (const std::string &scriptId, const std::string &uiLayout, bool setAsModified=true, bool sendUpdate=true) |
| virtual bool | hasModifiedScripts () const |
| virtual void | preserveModifiedScripts () |
| virtual void | restorePreservedScripts () |
| virtual int | mapScriptToAction (const DtScriptedTaskMetaData &script, bool addIfMissing=true) |
| virtual int | mapScriptToAction (const std::string &scriptId) const |
| virtual void | unmapScript (const DtScriptedTaskMetaData &) |
| virtual void | setMonitorFrameRates (const std::string &scriptId, bool monitor) |
| virtual const ActionCategories & | actionCategories () const |
| virtual const Doctrines & | doctrines () const |
| virtual void | requestScriptsIfNeeded () |
| virtual DtSimTaskMessageType | remapScriptId (const DtSimTaskMessageType &scriptId) const |
| virtual DtSetMessageType | remapScriptId (const DtSetMessageType &scriptId) const |
| virtual std::string | remapScriptId (const std::string &scriptId) const |
| virtual std::vector < DtSimTaskMessageType > | scriptedTasksValidFor (const DtEntityType &, int force=-1) const |
| virtual std::vector < DtSetMessageType > | scriptedSetsValidFor (const DtEntityType &, int force=-1) const |
| virtual std::vector < DtSimTaskMessageType > | reactiveTasksValidFor (const DtEntityType &, int force=-1) const |
| virtual std::vector < DtSimTaskMessageType > | backgroundProcessesValidFor (const DtEntityType &, int force=-1) const |
| virtual std::vector < DtSimTaskMessageType > | scriptedTasksValidFor (makVrv::DtUniqueID) const |
| virtual std::vector < DtSimTaskMessageType > | reactiveTasksValidFor (makVrv::DtUniqueID) const |
| virtual std::vector < DtSimTaskMessageType > | backgroundProcessesValidFor (makVrv::DtUniqueID) const |
| virtual std::vector< std::string > | scriptsValidFor (const DtEntityType &, int scriptType, int force=-1) const |
| virtual std::vector< std::string > | scriptsValidFor (int scriptType) const |
| virtual std::vector< std::string > | scriptsThatSupportDoctrine (const std::string &) const |
| virtual int | scriptedTaskTypeFor (const makVrv::DtUnicode &) const |
| virtual std::string | formatScript (const std::string &script, int scriptType, const std::string &commentBlock) const |
| const DoctrinesByForce & | doctrinesByForce () const |
| virtual const std::set < DtString > & | scriptedTasksToShowOnTopLevelRightClickMenu () const |
| virtual std::string | doctrineForForce (int) const |
| virtual void | removeUiLayout (const std::string &scriptId, bool removeFromBackEnd=true) |
| virtual bool | scriptsLoaded () const |
| virtual bool | activeRequest () const |
| virtual void | addScriptedTaskType (int, const makVrv::DtUnicode &name) |
| virtual void | addScriptedTaskTypeIcon (int, bool isSystemIcon, const std::string &) |
| virtual makVrv::DtUnicode | getScriptedTaskTypeName (int) const |
| virtual std::string | getScriptedTaskTypeIcon (int, bool isSystemScrript) const |
| virtual ScriptedTaskTypeNames | getScriptedTaskTypes () const |
| virtual void | removeScriptedTaskType (int) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtVrfScriptedTaskManager & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &, DtVrfScriptedTaskManager *) |
Public Attributes | |
| boost::signals2::signal< void(std::string)> | signal_scriptSaveError |
| boost::signals2::signal< void()> | signal_scriptedTaskManagerAboutToChange |
| boost::signals2::signal< void()> | signal_aboutToClearScriptedTasks |
| boost::signals2::signal< void(std::string)> | signal_scriptedTaskAboutToBeRemoved |
| boost::signals2::signal< void(std::string)> | signal_scriptedTaskAdded |
| boost::signals2::signal< void()> | signal_receivedScriptedTasks |
| boost::signals2::signal< void(int)> | signal_scriptedTaskTypeAdded |
| boost::signals2::signal< void(int)> | signal_scriptedTaskTypeRemoved |
| boost::signals2::signal< void()> | signal_doctrinesReceived |
| boost::signals2::signal< void(std::string, bool, std::string)> | signal_scriptErrorChange |
| boost::signals2::signal< void(std::string, bool)> | signal_scriptModified |
| boost::signals2::signal< void()> | signal_scriptModifiedCleared |
| boost::signals2::signal< void(int, std::string)> | signal_scriptRemovedFromTaskMenu |
| boost::signals2::signal< void(int, std::string)> | signal_scriptRemovedFromSetMenu |
| boost::signals2::signal< void(int, std::string)> | signal_scriptAddedToTaskMenu |
| boost::signals2::signal< void(int, std::string)> | signal_scriptAddedToSetMenu |
| boost::signals2::signal< void(int, std::string)> | signal_assignedDoctrineChanged |
| boost::signals2::signal< void(std::string, std::string, int)> | signal_scriptIdChanged |
Protected Types | |
| typedef std::map< std::string, int > | ScriptIdToActionIdMap |
Protected Member Functions | |
| virtual std::string | language () const |
| virtual void | receiveScriptedTaskChecksums (DtSimMessage *msg) |
| virtual void | receiveScriptedTaskList (DtSimMessage *msg) |
| virtual void | receiveActionCategories (DtSimMessage *msg) |
| virtual void | receiveDoctrines (DtSimMessage *msg) |
| virtual void | processDoctrinesOperation (DtSimMessage *msg) |
| virtual void | receivedScriptedTaskUpdateMessage (DtSimMessage *msg) |
| virtual void | slot_backendRemoved (const DtVrfBackendState &) |
| virtual void | scriptIdChanged (const std::string &oldId, const std::string &newId) |
| virtual std::string | addPrefixOrSuffix (int type, const DtString &scriptdId) const |
| virtual void | addToCreatorFactory (const DtScriptedTaskMetaData &md) |
| virtual void | removeFromFactory (const DtScriptedTaskMetaData &script) |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| makVrv::DtSignalConnectionManager | myConnectionManager |
| ScriptedTasks | myScriptedTasks |
| PreservedScripts | myPreservedScripts |
| unsigned int | myRequestId |
| ScriptIdToActionIdMap | myScriptIdToActionIdMap |
| DtSimulationAddress | myScriptMonitorAddress |
| std::map< std::string, int > | myMonitoring |
| ActionCategories | myActionCategories |
| Doctrines | myDoctrines |
| bool | myRequestScriptsIfNeeded |
| bool | myRequestScriptChecksums |
| ScriptedTaskTypeInformation | myScriptedTaskTypeInformation |
| DoctrinesByForce | myDoctrinesByForce |
| std::set< DtString > | myScriptsToShowOnTopLevelRightClickMenu |
| std::map< std::string, bool > | myWaitingToBeModified |
| std::map< std::string, std::string > | myScriptIdToScriptIdMap |
| bool | myScriptsLoaded |
| bool | myNewContentAdded |
| std::set< DtFilename > | mySMSLoaded |
| typedef std::map<int, makVrv::DtUnicode> makVrf::DtVrfScriptedTaskManager::ScriptedTaskTypeNames |
| typedef std::map<bool, std::string> makVrf::DtVrfScriptedTaskManager::IconType |
| typedef std::map<int, std::string> makVrf::DtVrfScriptedTaskManager::DoctrinesByForce |
| typedef std::map<int, ScriptedTaskDialogInformation> makVrf::DtVrfScriptedTaskManager::ScriptedTaskTypeInformation |
| typedef std::map<std::string, ScenarioSystemPair> makVrf::DtVrfScriptedTaskManager::ScriptedTasks |
| typedef std::pair<std::string, bool> makVrf::DtVrfScriptedTaskManager::ActionCategory |
| typedef std::set<std::string> makVrf::DtVrfScriptedTaskManager::Doctrines |
| typedef std::map<std::string, ActionCategory> makVrf::DtVrfScriptedTaskManager::ActionCategories |
| typedef std::map<std::string, PreservedScript> makVrf::DtVrfScriptedTaskManager::PreservedScripts |
|
protected |
| makVrf::DtVrfScriptedTaskManager::DtVrfScriptedTaskManager | ( | makVrv::DtDe & | ) |
|
virtual |
|
static |
Returns instance of the manager.
|
static |
|
virtual |
Clears out scripted tasks. Before clearing will emit a signal that the manager is about to be cleared. If andSettings is true, also clear which scripts are available in the scenario.
|
virtual |
Removes a scripted task. Emits a signal before removal that it is about to be removed.
Reimplemented in makVrf::DtQtVrfScriptedTaskManager.
|
virtual |
Returns the scripted task meta data given the unique id.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Return scenario script first, if exists, and, if not, system.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns true if the scripted task manager does not have all the SMS files for the scripts loaded.
|
virtual |
Adds a scripted task meta data. Will signal that the task has been added. If addScript is true will also set the script supplied with the scripted task.
|
virtual |
Adds the scripted task meta data to the scenario scripts and copied the script of the source id to the newly created scripts.
|
virtual |
Requests to update the scripted task data on the server. The original id is provided in the case that the id needs to be check in order to see if the id has changed and needs to be modified on the server. Note that if the id is changed in the meta data and the original id is not provided, the script modification will act as if this is a new script being added.
|
virtual |
Requests to remove the scripted task data on the server.
|
virtual |
Adds a scripted task meta data locally. If signal is true signal that addition.
Reimplemented in makVrf::DtQtVrfScriptedTaskManager.
|
virtual |
Requests the currently available scripted task meta data. Once received will emit a signal that there is new content.
|
virtual |
Loads the metadata for the scripted tasks for the given scenario.
|
virtual |
Returns true if the id is a system script.
|
virtual |
|
virtual |
|
virtual |
Returns true if the id has a system script representation, even if it shares the scenario script id.
|
virtual |
|
virtual |
|
virtual |
Returns true if script appears on a menu.
|
virtual |
Returns true if script appears on a toolbar.
|
virtual |
Returns true if system script is available for task menu.
|
virtual |
Set whether or not system script is available. Will emit signal if value changes.
|
virtual |
Removes script.
|
virtual |
Returns all scripted tasks.
|
virtual |
Remaps the path to use appropriate scripted task ids.
|
virtual |
Returns true if the scripted task is present in the system.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns true if the doctrine is present.
|
virtual |
Returns a unique script id with the supplied script id as a base. If the script id itself is unique will return that. If additionalToCheck is specified will also check that additional list against uniqueness of ids. This is to provide ids that are going to be added but might not have been reflected from the network. Given the script type might add additional information. For example, if the script type is a Set will add set_ before the script type.
|
virtual |
Tells the back-ends to make the provided script a system script. This will remove it from the scenario but make it available to all scenarios. Note that if the user does not save the scenario it will still be present in the scenario scripts when they load the scenario again, however it will not change the system script.
|
virtual |
Assigns error to script and signals that a script error has occurred.
|
virtual |
Clears out that there is a script error and signals the all clear.
|
virtual |
Returns true if the script has an error. If it has an error the supplied error string will be the last error reported.
|
virtual |
Sets the fact that the script has been modified and not yet saved to the scenario.
|
virtual |
Sets the fact that the script is modified.
|
virtual |
Clears out all modified statuses.
|
virtual |
Sets the script in case users decide to update modified scripts to a rewound scenario. When modified is cleared, or, script is set to not modified, the script will be removed. Sends message to notify of script modification. If setAsModified is true will also set the script as modified.
|
virtual |
Sets the layout in case users decide to update modified scripts to a rewound scenario. When modified is cleared, or, script is set to not modified, the script will be removed. Sends message to notify of script modification. If setAsModified is true will also set the script as modified.
|
virtual |
Returns true if there are any modified scripts.
|
virtual |
Preserves scripts for possible restore. The restored script list will be cleared when complete.
|
virtual |
If any scripts are preserved restores them and then class clearModifiedScripts()
|
virtual |
Returns a script id to menu id mapping. If mapping does not exist creates one and puts it in the map.
|
virtual |
|
virtual |
Unmaps a script id to action id.
|
virtual |
Sets whether or not to monitor frame rates. If script id is blank will apply to all scripts.
|
virtual |
Returns the currently supported action categories.
|
virtual |
Returns the currently supported doctrines.
|
virtual |
Requests scripted tasks if not already requested for this session/scenario load.
|
virtual |
Routines for aiding in the extension of the meta data dialog. Tied to types of scripts available and routines to modify the dialog if that script type is selected.
|
virtual |
Routines for aiding in the extension of the meta data dialog. Tied to types of scripts available and routines to modify the dialog if that script type is selected.
|
virtual |
Routines for aiding in the extension of the meta data dialog. Tied to types of scripts available and routines to modify the dialog if that script type is selected.
|
virtual |
Routines for aiding in the extension of the meta data dialog. Tied to types of scripts available and routines to modify the dialog if that script type is selected.
|
virtual |
Routines for aiding in the extension of the meta data dialog. Tied to types of scripts available and routines to modify the dialog if that script type is selected.
|
virtual |
Routines for aiding in the extension of the meta data dialog. Tied to types of scripts available and routines to modify the dialog if that script type is selected.
|
virtual |
Remaps the script id from a possible original to an alias. If the id given is not a script, or, does not have an alias returns the script id.
|
virtual |
|
virtual |
|
virtual |
Returns a list of all scripted task ids that are valid for the given entity type.
|
virtual |
Returns a list of all scripted set ids that are valid for the given entity type.
|
virtual |
Returns a list of all reactive task ids that are valid for the given entity type.
|
virtual |
Returns a list of all background process ids that are valid for the given entity type.
|
virtual |
Returns a list of all scripted task ids that are valid for the given entity type.
|
virtual |
Returns a list of all reactive task ids that are valid for the given entity type.
|
virtual |
Returns a list of all background process ids that are valid for the given entity type.
|
virtual |
Returns a list of all task ids that are valid for the given entity type and script type.
|
virtual |
Returns a list of all task ids that are valid for the given script type.
|
virtual |
Returns a list of all scripts that support the given doctrine.
|
virtual |
Returns the script type based on the script type string.
|
virtual |
Given the script replace all internal comments with appropriate replacements.
|
inline |
Returns the list of doctrines by force.
|
virtual |
All the scripted items to show on the right click top level.
|
virtual |
Returns the current doctrine for the specified force, or blank if no doctrine is assigned.
|
virtual |
Removes the UI layout internally, and, optionally, sends a message to the back-end to get rid of it as well.
|
virtual |
Returns true if the loadScripts() call has been made at least once.
|
virtual |
Returns true if there is an active scripted task request.
|
protectedvirtual |
Returns the language to use for scripted task translations.
Reimplemented in makVrf::DtQtVrfScriptedTaskManager.
|
protectedvirtual |
Called when scripted task checksums are received.
|
protectedvirtual |
Called when scripted tasks are received.
|
protectedvirtual |
Called when action categories are received.
|
protectedvirtual |
Called when doctrines are received.
|
protectedvirtual |
Called to check to see if a doctrine has been assigned to a force. If so clear out all current task information for any entity that has that force.
|
protectedvirtual |
Called when a scripted task request/add/update/remove message is received.
|
protectedvirtual |
Called when a backend is removed, if this is the monitoring backend restart on another.
|
protectedvirtual |
Called in response to a script id change.
|
protectedvirtual |
Adds a new prefix or suffix to generated script id given the type.
|
protectedvirtual |
|
protectedvirtual |
| boost::signals2::signal<void (std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptSaveError |
| boost::signals2::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskManagerAboutToChange |
| boost::signals2::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_aboutToClearScriptedTasks |
| boost::signals2::signal<void (std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskAboutToBeRemoved |
| boost::signals2::signal<void (std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskAdded |
| boost::signals2::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_receivedScriptedTasks |
| boost::signals2::signal<void (int)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskTypeAdded |
| boost::signals2::signal<void (int)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskTypeRemoved |
| boost::signals2::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_doctrinesReceived |
| boost::signals2::signal<void (std::string, bool, std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptErrorChange |
Signals a script error. First parameter is the id, second is true/false that there is an error third is error string if there is an error.
| boost::signals2::signal<void (std::string, bool)> makVrf::DtVrfScriptedTaskManager::signal_scriptModified |
Signals that a script has been modified.
| boost::signals2::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_scriptModifiedCleared |
Signals that modified statuses have been cleared.
| boost::signals2::signal<void (int, std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptRemovedFromTaskMenu |
Signal sent when a scripted task menu item is removed. Sends menu id and script id.
| boost::signals2::signal<void (int, std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptRemovedFromSetMenu |
Signal sent when a scripted set menu item is removed. Sends menu id and script id.
| boost::signals2::signal<void (int, std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptAddedToTaskMenu |
Signal sent when a scripted task menu item is added. Sends menu id and script id.
| boost::signals2::signal<void (int, std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptAddedToSetMenu |
Signal sent when a scripted set menu item is added. Sends menu id and script id.
| boost::signals2::signal<void (int, std::string)> makVrf::DtVrfScriptedTaskManager::signal_assignedDoctrineChanged |
Signal sent when assigned doctrines change.
| boost::signals2::signal<void (std::string, std::string, int)> makVrf::DtVrfScriptedTaskManager::signal_scriptIdChanged |
Signal sent when the script id has changed (old to new). The int is the new action id.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |