![]() |
VR-Forces 4.8 Class Documentation
|
This class will manage translators that can be used by scripted tasks. More...

Classes | |
| struct | TranslationData |
Public Member Functions | |
| DtQtVrfScriptedTaskManager (makVrv::DtDe &) | |
| virtual | ~DtQtVrfScriptedTaskManager () |
| virtual void | removeTranslator (const std::string &) |
| Removes the translator for the given script id. More... | |
Public Member Functions inherited from makVrf::DtVrfScriptedTaskManager | |
| DtVrfScriptedTaskManager (makVrv::DtDe &) | |
| virtual | ~DtVrfScriptedTaskManager () |
| virtual void | clear (bool andSetting=true, bool reset=true, bool signal=true) |
| Clears out scripted tasks. More... | |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtSimTaskMessageType &scriptId, bool system) const |
| Returns the scripted task meta data given the unique id. More... | |
| 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 |
| Return scenario script first, if exists, and, if not, system. More... | |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtSetMessageType &scriptId) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const DtGenericMessageType &scriptId) const |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const std::string &scriptId) const |
| virtual void | addScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, bool addScript=false, bool addLayout=false) |
| Adds a scripted task meta data. More... | |
| virtual void | duplicateScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, const std::string &sourceId) |
| Adds the scripted task meta data to the scenario scripts and copied the script of the source id to the newly created scripts. More... | |
| virtual void | updateScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, const std::string &originalId="") |
| Requests to update the scripted task data on the server. More... | |
| virtual void | deleteScriptedTaskMetaData (const std::string &) |
| Requests to remove the scripted task data on the server. More... | |
| virtual void | requestScriptedTasks () |
| Requests the currently available scripted task meta data. More... | |
| virtual bool | isSystemScript (const DtSimTaskMessageType &) const |
| Returns true if the id is a system script. More... | |
| virtual bool | isSystemScript (const DtSetMessageType &) const |
| virtual bool | isSystemScript (const std::string &) const |
| virtual bool | hasSystemScript (const DtSimTaskMessageType &) const |
| Returns true if the id has a system script representation, even if it shares the scenario script id. More... | |
| virtual bool | hasSystemScript (const DtSetMessageType &) const |
| virtual bool | hasSystemScript (const std::string &) const |
| virtual bool | appearsOnMenu (const std::string &) const |
| Returns true if script appears on a menu. More... | |
| virtual bool | appearsOnToolbar (const std::string &) const |
| Returns true if script appears on a toolbar. More... | |
| virtual bool | systemScriptAvailable (const std::string &) const |
| Returns true if system script is available for task menu. More... | |
| virtual void | setSystemScriptAvailable (const std::string &id, bool) |
| Set whether or not system script is available. Will emit signal if value changes. More... | |
| virtual void | removeSystemScript (const std::string &id, bool signal=true) |
| Removes script. More... | |
| virtual const ScriptedTasks & | scriptedTaskMetaData () const |
| Returns all scripted tasks. More... | |
| virtual std::string | remapMenuPath (std::string originalPath) const |
| Remaps the path to use appropriate scripted task ids. More... | |
| virtual bool | hasScriptedTaskMetaData (const DtSimTaskMessageType &) const |
| Returns true if the scripted task is present in the system. More... | |
| 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 |
| Returns true if the doctrine is present. More... | |
| virtual std::string | uniqueScriptIdFrom (const std::string &, int scriptType, std::set< std::string > additionalToCheck=std::set< std::string >()) const |
| Returns a unique script id with the supplied script id as a base. More... | |
| virtual void | makeSystemScript (const std::string &) |
| Tells the back-ends to make the provided script a system script. More... | |
| virtual void | assignScriptError (const std::string &scriptId, const std::string &error) |
| Assigns error to script and signals that a script error has occured. More... | |
| virtual void | clearScriptError (const std::string &scriptId) |
| Clears out that there is a script error and signals the all clear. More... | |
| virtual bool | scriptHasError (const std::string &scriptId, std::string *error=0) const |
| Returns true if the script has an error. More... | |
| virtual bool | scriptIsModified (const std::string &scriptId) const |
| Sets the fact that the script has been modified and not yet saved to the scenario. More... | |
| virtual void | setScriptModified (const std::string &scriptId, bool) |
| Sets the fact that the script is modified. More... | |
| virtual void | clearModifiedScripts () |
| Clears out all modified statuses. More... | |
| virtual void | setScript (const std::string &scriptId, const std::string &script, bool setAsModified=true) |
| Sets the script in case users decide to update modified scripts to a rewound scenario. More... | |
| virtual void | setUiLayout (const std::string &scriptId, const std::string &uiLayout, bool setAsModified=true, bool sendUpdate=true) |
| Sets the layout in case users decide to update modified scripts to a rewound scenario. More... | |
| virtual bool | hasModifiedScripts () const |
| Returns true if there are any modified scripts. More... | |
| virtual void | preserveModifiedScripts () |
| Preserves scripts for possible restore. The restored script list will be cleared when complete. More... | |
| virtual void | restorePreservedScripts () |
| If any scripts are preserved restores them and then class clearModifiedScripts() More... | |
| virtual int | mapScriptToAction (const DtScriptedTaskMetaData &script, bool addIfMissing=true) |
| Returns a script id to menu id mapping. If mapping does not exist creates one and puts it in the map. More... | |
| virtual void | unmapScript (const DtScriptedTaskMetaData &) |
| Unmaps a script id to action id. More... | |
| virtual void | setMonitorFrameRates (const std::string &scriptId, bool monitor) |
| Sets whether or not to monitor frame rates. If script id is blank will apply to all scripts. More... | |
| virtual const ActionCategories & | actionCategories () const |
| Returns the currently supported action categories. More... | |
| virtual const Doctrines & | doctrines () const |
| Returns the currently supported doctrines. More... | |
| virtual void | requestScriptsIfNeeded () |
| Requests scripted tasks if not already requested for this session/scenario load. More... | |
| virtual DtSimTaskMessageType | remapScriptId (const DtSimTaskMessageType &scriptId) const |
| Remaps the script id from a possible original to an alias. More... | |
| 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 |
| Returns a list of all scripted task ids that are valid for the given entity type. More... | |
| virtual std::vector < DtSetMessageType > | scriptedSetsValidFor (const DtEntityType &, int force=-1) const |
| Returns a list of all scripted set ids that are valid for the given entity type. More... | |
| virtual std::vector < DtSimTaskMessageType > | reactiveTasksValidFor (const DtEntityType &, int force=-1) const |
| Returns a list of all reactive task ids that are valid for the given entity type. More... | |
| virtual std::vector < DtSimTaskMessageType > | backgroundProcessesValidFor (const DtEntityType &, int force=-1) const |
| Returns a list of all background process ids that are valid for the given entity type. More... | |
| virtual std::vector < DtSimTaskMessageType > | scriptedTasksValidFor (makVrv::DtUniqueID) const |
| Returns a list of all scripted task ids that are valid for the given entity type. More... | |
| virtual std::vector < DtSimTaskMessageType > | reactiveTasksValidFor (makVrv::DtUniqueID) const |
| Returns a list of all reactive task ids that are valid for the given entity type. More... | |
| virtual std::vector < DtSimTaskMessageType > | backgroundProcessesValidFor (makVrv::DtUniqueID) const |
| Returns a list of all background process ids that are valid for the given entity type. More... | |
| virtual std::vector< std::string > | scriptsValidFor (const DtEntityType &, int scriptType, int force=-1) const |
| Returns a list of all task ids that are valid for the given entity type and script type. More... | |
| virtual std::vector< std::string > | scriptsValidFor (int scriptType) const |
| Returns a list of all task ids that are valid for the given script type. More... | |
| virtual std::vector< std::string > | scriptsThatSupportDoctrine (const std::string &) const |
| Returns a list of all scripts that support the given doctrine. More... | |
| virtual int | scriptedTaskTypeFor (const makVrv::DtUnicode &) const |
| Returns the script type based on the script type string. More... | |
| virtual std::string | formatScript (const std::string &script, int scriptType, const std::string &commentBlock) const |
| Given the script replace all internal comments with appropriate replacements. More... | |
| const DoctrinesByForce & | doctrinesByForce () const |
| Returns the list of doctrines by force. More... | |
| virtual const std::set < DtString > & | scriptedTasksToShowOnTopLevelRightClickMenu () const |
| All the scripted items to show on the right click top level. More... | |
| virtual std::string | doctrineForForce (int) const |
| Returns the current doctrine for the specified force, or blank if no doctrine is assigned. More... | |
| virtual void | setResponseTimeout (int) |
| Set response timeout (in seconds). Default is 10. More... | |
| virtual int | responseTimeout () const |
| virtual void | removeUiLayout (const std::string &scriptId, bool removeFromBackEnd=true) |
| Removes the UI layout internally, and, optionally, sends a message to the back-end to get rid of it as well. More... | |
| 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 () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Protected Types | |
| typedef std::map< std::string, TranslationData > | Translations |
Protected Types inherited from makVrf::DtVrfScriptedTaskManager | |
| typedef std::map< std::string, int > | ScriptIdToActionIdMap |
Protected Member Functions | |
| virtual void | addScriptedTaskMetaData (const DtScriptedTaskMetaData &, bool signal=true) |
| Adds a scripted task meta data locally. If signal is true signal that addition. More... | |
| virtual void | removeScriptedTaskMetaData (const std::string &scriptedTaskId, bool signal=true) |
| Removes a scripted task. More... | |
| virtual void | clear (bool andSettings) |
| virtual std::string | language () const |
| Returns the language to use for scripted task translations. More... | |
Protected Member Functions inherited from makVrf::DtVrfScriptedTaskManager | |
| virtual void | receiveScriptedTaskList (DtSimMessage *msg) |
| Called when scripted tasks are received. Will clear out existing tasks before replacing. More... | |
| virtual void | receiveActionCategories (DtSimMessage *msg) |
| Called when action categories are received. More... | |
| virtual void | receiveDoctrines (DtSimMessage *msg) |
| Called when doctrines are received. More... | |
| virtual void | processDoctrinesOperation (DtSimMessage *msg) |
| Called to check to see if a doctrine has been assigned to a force. More... | |
| virtual void | receivedScriptedTaskUpdateMessage (DtSimMessage *msg) |
| Called when a scripted task request/add/update/remove message is received. More... | |
| virtual void | slot_backendRemoved (const DtVrfBackendState &) |
| Called when a backend is removed, if this is the monitoring backend restart on another. More... | |
| virtual void | scriptIdChanged (const std::string &oldId, const std::string &newId) |
| Called in response to a script id change. More... | |
| virtual std::string | addPrefixOrSuffix (int type, const DtString &scriptdId) const |
| Adds a new prefix or suffix to generated script id given the type. More... | |
| virtual void | responseTick () |
| Tick called when waiting for a response and possible timeout on receipt. More... | |
| virtual void | addToCreatorFactory (const DtScriptedTaskMetaData &md) |
| virtual void | removeFromFactory (const DtScriptedTaskMetaData &script) |
Protected Attributes | |
| Translations | myTranslations |
Protected Attributes inherited from makVrf::DtVrfScriptedTaskManager | |
| 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 |
| ScriptedTaskTypeInformation | myScriptedTaskTypeInformation |
| DoctrinesByForce | myDoctrinesByForce |
| time_t | mySendTime |
| int | myResponseTimeout |
| std::set< DtString > | myScriptsToShowOnTopLevelRightClickMenu |
| std::map< std::string, bool > | myWaitingToBeModified |
| std::map< std::string, std::string > | myScriptIdToScriptIdMap |
Additional Inherited Members | |
Public Types inherited from makVrf::DtVrfScriptedTaskManager | |
| 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 |
Static Public Member Functions inherited from makVrf::DtVrfScriptedTaskManager | |
| static DtVrfScriptedTaskManager & | instance (makVrv::DtDe &de) |
| Returns instance of the messager. More... | |
| static void | registerInstance (makVrv::DtDe &, DtVrfScriptedTaskManager *) |
Public Attributes inherited from makVrf::DtVrfScriptedTaskManager | |
| 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 |
| Signals a script error. More... | |
| boost::signals2::signal< void(std::string, bool)> | signal_scriptModified |
| Signals that a script has been modified. More... | |
| boost::signals2::signal< void()> | signal_scriptModifiedCleared |
| Signals that modified statuses have been cleared. More... | |
| boost::signals2::signal< void(int, std::string)> | signal_scriptRemovedFromTaskMenu |
| Signal sent when a scripted task menu item is removed. Sends menu id and script id. More... | |
| boost::signals2::signal< void(int, std::string)> | signal_scriptRemovedFromSetMenu |
| Signal sent when a scripted set menu item is removed. Sends menu id and script id. More... | |
| boost::signals2::signal< void(int, std::string)> | signal_scriptAddedToTaskMenu |
| Signal sent when a scripted task menu item is added. Sends menu id and script id. More... | |
| boost::signals2::signal< void(int, std::string)> | signal_scriptAddedToSetMenu |
| Signal sent when a scripted set menu item is added. Sends menu id and script id. More... | |
| boost::signals2::signal< void(int, std::string)> | signal_assignedDoctrineChanged |
| Signal sent when assigned doctrines change. More... | |
| boost::signals2::signal< void(std::string, std::string, int)> | signal_scriptIdChanged |
| Signal sent when the script id has changed (old to new). The int is the new action id. More... | |
This class will manage translators that can be used by scripted tasks.
|
protected |
| makVrf::DtQtVrfScriptedTaskManager::DtQtVrfScriptedTaskManager | ( | makVrv::DtDe & | ) |
|
virtual |
|
virtual |
Removes the translator for the given script id.
|
protectedvirtual |
Adds a scripted task meta data locally. If signal is true signal that addition.
Reimplemented from makVrf::DtVrfScriptedTaskManager.
|
protectedvirtual |
Removes a scripted task.
Emits a signal before removal that it is about to be removed
Reimplemented from makVrf::DtVrfScriptedTaskManager.
|
protectedvirtual |
|
protectedvirtual |
Returns the language to use for scripted task translations.
Reimplemented from makVrf::DtVrfScriptedTaskManager.
|
protected |