![]() |
VR-Forces Developer's Guide
|
The DtVrfSaveScenarioHandler is responsible for getting the name of the scenario to save to and then saving the scenario as well as additional specific GUI information.

Public Member Functions | |
| DtVrfSaveScenarioHandler (makVrv::DtDe &) | |
| virtual | ~DtVrfSaveScenarioHandler () override |
| virtual bool | saveScenarioAs () |
| virtual int | saveScenario (bool forceOverwrite=false, bool queueSave=false, bool useScenarioNameAsSeed=true) |
| virtual void | setScenario (const DtScenario *) |
| virtual bool | isValidScenarioExtension (const DtString &extension) const |
| virtual bool | saveScenario (const QString &s, bool setAsSaved=true, bool queueSave=false, bool preserveBackendMappings=true, bool startPlayingAfterSave=false) |
| virtual bool | saveScenario (const DtFilename &s, bool setAsSaved=true, bool queueSave=false, bool preserveBackendMappings=true, bool startPlayingAfterSave=false) |
| virtual bool | setupScenarioToSave (const QString &filename, bool setAsSaved) |
| virtual bool | getScenarioSaveName (QString &, bool *asked=0, bool useScenarioNameAsSeed=true) const |
| virtual DtFilename | saveScenarioName (bool askIfDoesNotExist=true, bool *asked=0, bool useScenarioNameAsSeed=true) const |
| virtual void | setCheckpointIdentifier (const std::string &) |
| virtual const std::string & | checkpointIdentifier () const |
| virtual DtFilename | chooseScenarioNameBasedOn (const DtScenario &, bool saveIntoScenario=false) |
| virtual QString | makeRelativeTo (QString origFile, QString path) const |
| virtual void | checkpointScenario (const QString &baseFilename, bool forceOverwrite=false, bool queueSave=false, bool startPlayingAfterSave=false) |
| virtual QString | checkpointIdentifier (const QString &filename, bool plain=false) const |
| virtual QString | checkpointIdentifier (const QString &filename, double currentSimTime, bool plain=false) const |
| virtual QString | getTimeString (double time, char separator= '_') const |
| virtual void | setDataIntoScenario (DtScenario &) |
| virtual DtScenario * | initializeCheckpointedScenario (const DtFilename &scenarioName, double simTime) |
| virtual std::string | scenarioExtentInformation () const |
| virtual void | newScenario () |
| virtual void | closeScenario () |
| virtual QString | startingDirectory () const |
| virtual void | setStartingDirectory (const QString &) |
| const DtScenario * | scenario () const |
| virtual void | setSaving (bool) |
| virtual bool | saving () const |
| DtFilename | savedFilename () const |
| virtual bool | isDefaultObserverView (const std::string &) const |
| virtual std::string | defaultObserverView (bool &is2D) const |
| virtual void | setDefaultObserverView (const std::string &) |
| virtual void | setTerrainViewVisible (const std::string &, bool vis) |
| virtual const std::set < std::string > & | hiddenTerrainViews () const |
| virtual std::set< std::string > & | hiddenTerrainViews () |
| virtual bool | terrainViewHidden (const std::string &) const |
| virtual void | setHiddenTerrainViews (const std::string &) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtVrfSaveScenarioHandler & | instance (makVrv::DtDe &de) |
Protected Member Functions | |
| virtual bool | canBePartOfExtent (DtSimObjectReference ref) const |
| virtual QString | createFilterList () const |
| virtual QString | relativePath () const |
| virtual QString | dataFolder () const |
| virtual bool | processPreserveMappings () |
| virtual bool | saveSelectionGroups (const QString &scenarioName, QString &selectionGroups, bool saveToZip) const |
| virtual bool | saveOverlays (const QString &scenarioName, QString &overlayName, bool saveToZip) const |
| virtual bool | saveGuiSettings (const QString &scenarioname, QString &guiSettingsName, bool saveToZip) const |
| virtual bool | saveObserverViews (const QString &scenarioname, QString &observerSettingsName, bool saveToZip) const |
Static Protected Member Functions | |
| static bool | preserveMappings (void *) |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| QString | myStartingDirectory |
| DtScenario * | myScenario |
| double | myRootSaveSimTime |
| std::string | myDefaultObserverView |
| std::string | myCheckpointIdentifier |
| bool | myRootSaveTimeSet |
| bool | mySaving |
| std::set< std::string > | myHiddenTerrainViews |
| makVrf::DtVrfSaveScenarioHandler::DtVrfSaveScenarioHandler | ( | makVrv::DtDe & | ) |
|
overridevirtual |
|
static |
Returns instance of the messager.
|
virtual |
|
virtual |
If force overwrite is true, and checkpointing, force an overwrite of the existing scenario file.
Returns choice of how user wants to save scenario 0 - No save DtSaveStartingSnapshot - Save starting snapshot and/or DtSaveCurrentCheckpoint If queueSave is true queue the save at the end of the current save checkpoint queue rather than pushing to the beginning
|
virtual |
|
virtual |
Returns true if this extension is a valid save scenario extension (.scn, .scnx)
|
virtual |
Default observer view handling Because of observer view changes, the new default observer view format must be <observer name>="">:[2D|3D] to indicate observer view mode. If no mode is given after the colon assumes 2D.
|
virtual |
Default observer view handling Because of observer view changes, the new default observer view format must be <observer name>="">:[2D|3D] to indicate observer view mode. If no mode is given after the colon assumes 2D.
|
virtual |
Default observer view handling Because of observer view changes, the new default observer view format must be <observer name>="">:[2D|3D] to indicate observer view mode. If no mode is given after the colon assumes 2D.
|
virtual |
Default observer view handling Because of observer view changes, the new default observer view format must be <observer name>="">:[2D|3D] to indicate observer view mode. If no mode is given after the colon assumes 2D.
|
virtual |
Default observer view handling Because of observer view changes, the new default observer view format must be <observer name>="">:[2D|3D] to indicate observer view mode. If no mode is given after the colon assumes 2D.
|
virtual |
Default observer view handling Because of observer view changes, the new default observer view format must be <observer name>="">:[2D|3D] to indicate observer view mode. If no mode is given after the colon assumes 2D.
|
virtual |
Default observer view handling Because of observer view changes, the new default observer view format must be <observer name>="">:[2D|3D] to indicate observer view mode. If no mode is given after the colon assumes 2D.
|
virtual |
These views are semi-colon separated views of the observer view format of name and mode.
|
virtual |
Saves the specified scenario, and, if optional flag is true, sets last saved filename to supplied filename.
|
virtual |
|
virtual |
|
virtual |
Gets a name to save the scenario under. If asked is supplied will be filled in true/false if the user was asked for the name via a dialog.
|
virtual |
The name of the scenario to be saved. If no name exists will ask the user for one. If asked is supplied filled with true if the user was asked for the scenario name.
|
virtual |
Sets the identifier that will identify checkpoint scenarios from their base scenario counterpart (default is at_time). Make sure this is something that can be found via s string search in the file name (so a blank or simply an _ or single charactrer would not be recommended)
|
virtual |
|
virtual |
Choose a unique name based on the given scenario. If this class does not yet have a myScenario member, creates one and assigns it to this given scenario and also assigns a filename to it. The filename will be based on the scenario name in the scenario (uniquely in the userData/scenarios directory) or a default name of "Scenario N" where N is a number that is unique on disk.
|
virtual |
|
virtual |
If queueSave is true queue the save at the end of the current save checkpoint queue rather than pushing to the beginning. If startPlayingAfterSave is will put the scenario into save mode after play.
|
virtual |
If plain is true, do not append _run for scenario batch run.
|
virtual |
|
virtual |
|
virtual |
Sets data into scenario structure (names, scenario data, etc)
|
virtual |
Returns a new DtScenario structure that represents a filename and other internals that will be checkpointed at the given sim time.
|
virtual |
Returns a string representation of the scenario extent for all current entities in the scenario. Format is geometric center with the altitude of the highest entity being the altitude, and the half size of the maximum of the width and height of the extent box encompassed by the entities.
|
virtual |
Called when a new scenario is started. Clears out some internal variables.
|
virtual |
Called when a scenario is closed. Clears out some internal variables.
|
virtual |
Accessor/mutator for starting directory.
|
virtual |
|
inline |
|
virtual |
|
inlinevirtual |
| DtFilename makVrf::DtVrfSaveScenarioHandler::savedFilename | ( | ) | const |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Save out gui settings file.
|
protectedvirtual |
Save out observer views file.
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |