![]() |
VR-Forces 4.3 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. | |
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. | |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const std::string &scriptId, bool system) const |
| Returns the scripted task meta data given the unique id. | |
| virtual DtScriptedTaskMetaData | scriptedTaskMetaData (const std::string &scriptId) const |
| Return scenario script first, if exists, and, if not, system. | |
| virtual void | addScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, bool addScript=false) |
| Adds a scripted task meta data. | |
| 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. | |
| virtual void | updateScriptedTaskMetaDataToScenario (const DtScriptedTaskMetaData &, const std::string &originalId="") |
| Requests to update the scripted task data on the server. | |
| virtual void | deleteScriptedTaskMetaData (const std::string &) |
| Requests to remove the scripted task data on the server. | |
| virtual void | requestScriptedTasks () |
| Requests the currently available scripted task meta data. | |
| virtual bool | isSystemScript (const std::string &) const |
| Returns true if the id is a system script. | |
| virtual bool | appearsOnMenu (const std::string &) const |
| Returns true if script appears on a menu. | |
| virtual bool | appearsOnToolbar (const std::string &) const |
| Returns true if script appears on a toolbar. | |
| virtual bool | systemScriptAvailable (const std::string &) const |
| Returns true if system script is available for task menu. | |
| virtual void | setSystemScriptAvailable (const std::string &id, bool) |
| Set whether or not system script is available. Will emit signal if value changes. | |
| virtual void | removeSystemScript (const std::string &id, bool signal=true) |
| Removes script. | |
| virtual const ScriptedTasks & | scriptedTaskMetaData () const |
| Returns all scripted tasks. | |
| virtual bool | hasScriptedTaskMetaData (const std::string &) const |
| Returns true if the scripted task is present in the system. | |
| virtual bool | hasScenarioScriptedTaskMetaData (const std::string &) const |
| virtual bool | hasSystemScriptedTaskMetaData (const std::string &) const |
| virtual bool | hasDoctrine (const std::string &) const |
| Returns true if the doctrine is present. | |
| virtual std::string | uniqueScriptIdFrom (const std::string &, std::set< std::string > additionalToCheck=std::set< std::string >()) const |
| Returns a unique script id with the supplied script id as a base. | |
| virtual void | makeSystemScript (const std::string &) |
| Tells the back-ends to make the provided script a system script. | |
| virtual void | assignScriptError (const std::string &scriptId, const std::string &error) |
| Assigns error to script and signals that a script error has occured. | |
| virtual void | clearScriptError (const std::string &scriptId) |
| Clears out that there is a script error and signals the all clear. | |
| virtual bool | scriptHasError (const std::string &scriptId, std::string *error=0) const |
| Returns true if the script has an error. | |
| virtual bool | scriptIsModified (const std::string &scriptId) const |
| Sets the fact that the script has been modified and not yet saved to the scenario. | |
| virtual void | setScriptModified (const std::string &scriptId, bool) |
| Sets the fact that the script is modified. | |
| virtual void | clearModifiedScripts () |
| Clears out all modified statuses. | |
| 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. | |
| virtual bool | hasModifiedScripts () const |
| Returns true if there are any modified scripts. | |
| virtual void | preserveModifiedScripts () |
| Preserves scripts for possible restore. The restored script list will be cleared when complete. | |
| virtual void | restorePreservedScripts () |
| If any scripts are preserved restores them and then class clearModifiedScripts() | |
| virtual int | mapScriptIdToAction (const std::string &scriptId) |
| Returns a script id to menu id mapping. If mapping does not exist creates one and puts it in the map. | |
| virtual void | unmapScriptId (const std::string &) |
| Unmaps a script id to action id. | |
| 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. | |
| virtual const ActionCategories & | actionCategories () const |
| Returns the currently supported action categories. | |
| virtual const Doctrines & | doctrines () const |
| Returns the currently supported doctrines. | |
| virtual void | requestScriptsIfNeeded () |
| Requests scripted tasks if not already requested for this session/scenario load. | |
| virtual std::vector< std::string > | scriptedTasksValidFor (const DtEntityType &, int force=-1) const |
| Returns a list of all scripted task ids that are valid for the given entity type. | |
| virtual std::vector< std::string > | reactiveTasksValidFor (const DtEntityType &, int force=-1) const |
| Returns a list of all reactive task ids that are valid for the given entity type. | |
| virtual std::vector< std::string > | backgroundProcessesValidFor (const DtEntityType &, int force=-1) const |
| Returns a list of all background process ids that are valid for the given entity type. | |
| virtual std::vector< std::string > | scriptedTasksValidFor (makVrv::DtUniqueID) const |
| Returns a list of all scripted task ids that are valid for the given entity type. | |
| virtual std::vector< std::string > | reactiveTasksValidFor (makVrv::DtUniqueID) const |
| Returns a list of all reactive task ids that are valid for the given entity type. | |
| virtual std::vector< std::string > | backgroundProcessesValidFor (makVrv::DtUniqueID) const |
| Returns a list of all background process ids that are valid for the given entity type. | |
| 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. | |
| virtual std::vector< std::string > | scriptsThatSupportDoctrine (const std::string &) const |
| Returns a list of all scripts that support the given doctrine. | |
| virtual int | scriptedTaskTypeFor (const makVrv::DtUnicode &) const |
| Returns the script type based on the script type string. | |
| const DoctrinesByForce & | doctrinesByForce () const |
| Returns the list of doctrines by force. | |
| virtual std::string | doctrineForForce (int) const |
| Returns the current doctrine for the specified force, or blank if no doctrine is assigned. | |
| virtual void | setResponseTimeout (int) |
| Set response timeout (in seconds). Default is 10. | |
| virtual int | responseTimeout () 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 () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
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. | |
| virtual void | removeScriptedTaskMetaData (const std::string &scriptedTaskId, bool signal=true) |
| Removes a scripted task. | |
| virtual void | clear (bool andSettings) |
| virtual std::string | language () const |
| Returns the language to use for scripted task translations. | |
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. | |
| virtual void | receiveActionCategories (DtSimMessage *msg) |
| Called when action categories are received. | |
| virtual void | receiveDoctrines (DtSimMessage *msg) |
| Called when doctrines are received. | |
| virtual void | processDoctrinesOperation (DtSimMessage *msg) |
| Called to check to see if a doctrine has been assigned to a force. | |
| virtual void | receivedScriptedTaskUpdateMessage (DtSimMessage *msg) |
| Called when a scripted task request/add/update/remove message is received. | |
| virtual void | slot_backendRemoved (const DtVrfBackendState &) |
| Called when a backend is removed, if this is the monitoring backend restart on another. | |
| virtual void | responseTick () |
| Tick called when waiting for a response and possible timeout on receipt. | |
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 |
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. | |
| static void | registerInstance (makVrv::DtDe &, DtVrfScriptedTaskManager *) |
Public Attributes inherited from makVrf::DtVrfScriptedTaskManager | |
| boost::signal< void()> | signal_aboutToClearScriptedTasks |
| boost::signal< void(std::string)> | signal_scriptedTaskAboutToBeRemoved |
| boost::signal< void(std::string)> | signal_scriptedTaskAdded |
| boost::signal< void()> | signal_receivedScriptedTasks |
| boost::signal< void(int)> | signal_scriptedTaskTypeAdded |
| boost::signal< void(int)> | signal_scriptedTaskTypeRemoved |
| boost::signal< void()> | signal_doctrinesReceived |
| boost::signal< void(std::string, bool, std::string)> | signal_scriptErrorChange |
| Signals a script error. | |
| boost::signal< void(std::string, bool)> | signal_scriptModified |
| Signals that a script has been modified. | |
| boost::signal< void()> | signal_scriptModifiedCleared |
| Signals that modified statuses have been cleared. | |
| boost::signal< void(int, std::string)> | signal_scriptRemovedFromTaskMenu |
| Signal sent when a scripted task menu item is removed. Sends menu id and script id. | |
| boost::signal< void(int, std::string)> | signal_scriptAddedToTaskMenu |
| Signal sent when a scripted task menu item is added. Sends menu id and script id. | |
| boost::signal< void(int, std::string)> | signal_assignedDoctrineChanged |
| Signal sent when assigned doctrines change. | |
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 |