![]() |
VR-Forces 4.2 Class Documentation
|
The Master DtVrfScriptedTaskManager. More...

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) |
| Clears out scripted tasks. | |
| virtual void | removeScriptedTaskMetaData (const std::string &scriptedTaskId, bool signal=true) |
| Removes a scripted task. | |
| 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 | addScriptedTaskMetaData (const DtScriptedTaskMetaData &, bool signal=true) |
| Adds a scripted task meta data locally. If signal is true signal that addition. | |
| 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 | 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 > | 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. | |
| 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 | 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) |
Static Public Member Functions | |
| static DtVrfScriptedTaskManager & | instance (makVrv::DtDe &de) |
| Returns instance of the messager. | |
| static void | registerInstance (makVrv::DtDe &, DtVrfScriptedTaskManager *) |
Public Attributes | |
| 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. | |
Protected Types | |
| typedef std::map< std::string, int > | ScriptIdToActionIdMap |
Protected Member Functions | |
| 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. | |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| 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 |
The Master DtVrfScriptedTaskManager.
The scripted task manager will be responsible for maintaining the list of currently available scripted tasks.
| 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 messager.
|
static |
|
virtual |
Clears out scripted tasks.
Before cleaing 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
|
virtual |
Returns the scripted task meta data given the unique id.
|
virtual |
Return scenario script first, if exists, and, if not, system.
|
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.
|
virtual |
Requests the currently available scripted task meta data.
Once received will emit a signal that there is new content.
|
virtual |
Returns true if the id is a system script.
|
virtual |
Returns true if script appears on a menu.
|
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 |
Returns true if the scripted task is present in the system.
|
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
|
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 occured.
|
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 |
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 |
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 |
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 task ids that are valid for the given entity type and script type.
|
virtual |
Returns a list of all scripts that support the given doctrine.
|
inline |
Returns the list of doctrines by force.
|
virtual |
Returns the current doctrine for the specified force, or blank if no doctrine is assigned.
|
protectedvirtual |
Called when scripted tasks are received. Will clear out existing tasks before replacing.
|
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.
| boost::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_aboutToClearScriptedTasks |
| boost::signal<void (std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskAboutToBeRemoved |
| boost::signal<void (std::string)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskAdded |
| boost::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_receivedScriptedTasks |
| boost::signal<void (int)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskTypeAdded |
| boost::signal<void (int)> makVrf::DtVrfScriptedTaskManager::signal_scriptedTaskTypeRemoved |
| boost::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_doctrinesReceived |
| boost::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::signal<void (std::string, bool)> makVrf::DtVrfScriptedTaskManager::signal_scriptModified |
Signals that a script has been modified.
| boost::signal<void ()> makVrf::DtVrfScriptedTaskManager::signal_scriptModifiedCleared |
Signals that modified statuses have been cleared.
| boost::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::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::signal<void (int, std::string)> makVrf::DtVrfScriptedTaskManager::signal_assignedDoctrineChanged |
Signal sent when assigned doctrines change.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |