![]() |
VR-Forces 4.6 Class Documentation
|
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. More...

Public Member Functions | |
| DtVrfSaveScenarioHandler (makVrv::DtDe &) | |
| virtual | ~DtVrfSaveScenarioHandler () |
| virtual bool | saveScenarioAs () |
| virtual int | saveScenario (bool forceOverwrite=false, bool queueSave=false, bool useScenarioNameAsSeed=true) |
| If force overwrite is true, and checkpointing, force an overwrite of the existing scenario file. | |
| virtual void | setScenario (const DtScenario *) |
| virtual bool | saveScenario (const QString &s, bool setAsSaved=true, bool queueSave=false, bool preserveBackendMappings=true, bool startPlayingAfterSave=false) |
| Saves the specified scenario, and, if optional flag is true, sets last saved filename to supplied filename. | |
| 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 |
| Gets a name to save the scenario under. | |
| virtual DtFilename | saveScenarioName (bool askIfDoesNotExist=true, bool *asked=0, bool useScenarioNameAsSeed=true) const |
| The name of the scenario to be saved. | |
| virtual void | setCheckpointIdentifier (const std::string &) |
| Sets the identifier that will identify checkpoint scenarios from their base scenario counterpart (default is at_time). | |
| virtual const std::string & | checkpointIdentifier () const |
| virtual DtFilename | chooseScenarioNameBasedOn (const DtScenario &, bool saveIntoScenario=false) |
| Choose a unique name based on the given scenario. | |
| virtual QString | makeRelativeTo (QString origFile, QString path) const |
| virtual void | checkpointScenario (const QString &baseFilename, bool forceOverwrite=false, bool queueSave=false, bool startPlayingAfterSave=false) |
| If queueSave is true queue the save at the end of the current save checkpoint queue rather than pushing to the beginning. | |
| virtual QString | checkpointIdentifier (const QString &filename, bool plain=false) const |
| If plain is true, do not append _run for scenario batch run. | |
| virtual QString | checkpointIdentifier (const QString &filename, double currentSimTime, bool plain=false) const |
| virtual QString | getTimeString (double time, char separator= '_') const |
| virtual void | setDataIntoScenario (DtScenario &) |
| Sets data into scenario structure (names, scenario data, etc) | |
| virtual DtScenario * | initializeCheckpointedScenario (const DtFilename &scenarioName, double simTime) |
| Returns a new DtScenario structure that represents a filename and other internals that will be checkpointed at the given sim time. | |
| virtual std::string | scenarioExtentInformation () const |
| Returns a string representation of the scenario extent for all current entities in the scenario. | |
| virtual void | newScenario () |
| Called when a new scenario is started. Clears out some internal variables. | |
| virtual void | closeScenario () |
| Called when a scenario is closed. Clears out some internal variables. | |
| 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 &) |
| These views are semi-colon separated views of the observer view format of name and mode. | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtVrfSaveScenarioHandler & | instance (makVrv::DtDe &de) |
| Returns instance of the messager. | |
Public Attributes | |
| boost::signal< void(DtScenario *)> | signal_scenarioInformationAboutToBeSaved |
| Signal sent right before the front-end scenario information is saved including the overlays, selection groups, GUI settings and saved observer views. | |
| boost::signal< void(DtScenario *)> | signal_scenarioAboutToBeSaved |
| Signal sent right before the scenario is to be saved. | |
Protected Member Functions | |
| virtual QString | createFilterList () const |
| virtual QString | startingDirectory () 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 |
| Save out gui settings file. | |
| virtual bool | saveObserverViews (const QString &scenarioname, QString &observerSettingsName, bool saveToZip) const |
| Save out observer views file. | |
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 |
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.
| makVrf::DtVrfSaveScenarioHandler::DtVrfSaveScenarioHandler | ( | makVrv::DtDe & | ) |
|
virtual |
|
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 |
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 |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
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.
|
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.
| boost::signal<void (DtScenario*)> makVrf::DtVrfSaveScenarioHandler::signal_scenarioInformationAboutToBeSaved |
Signal sent right before the front-end scenario information is saved including the overlays, selection groups, GUI settings and saved observer views.
This will signal before signal_scenarioAboutToBeSaved.
| boost::signal<void (DtScenario*)> makVrf::DtVrfSaveScenarioHandler::signal_scenarioAboutToBeSaved |
Signal sent right before the scenario is to be saved.
Can change the scenario and some information will get saved out to the scenario file on save. The items that can be changed will be in the scenario extras and will be removed before the scenario file is saved out. The items that can be modified are: ChangeOnSave_SimulationModelSet ChangeOnSave_SimulationTerrain ChangeOnSave_FrontEndTerrain ChangeOnSave_ComponentAttachmentTable ChangeOnSave_RandomNumberSeed ChangeOnSave_FrameMode ChangeOnSave_FrameTime
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |