VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtCgf Class Reference

The top level class of a VR-Forces Simulation Engine, representing a Computer Generated Forces instance. Through this class you can control the high-level functions of a CGF, including the following:

See Also
vrfUsingtheDtCgfClass
Note
It is not safe to call any DtCgf functions from within the tick() of DtCgf. For example, DtSimComponent subclass in a plugin should not make any calls to the global DtCgf obejct inside of its tick.
Related examples

Classes

struct  SimulationObjectGroupInformation
 

Public Member Functions

 DtCgf (const DtSimulationAddress &addr, const DtU32 &capabilities=0xffff)
 
virtual bool init (DtCommunicationManager *conn, DtU32 sessionId=1, DtVrfCreator *creator=0, bool checkDataDir=true)
 
virtual ~DtCgf ()
 
virtual const
DtVrfSimOptionsInterface
simOptions () const
 
virtual void setSimOptions (const DtVrfSimOptionsInterface &)
 
virtual void tick ()
 
virtual void sendFinalStatus ()
 
virtual void run ()
 
virtual void pause ()
 
virtual std::string protocol () const
 
virtual void rewind (int scenarioRunId=0)
 
virtual void setRejectMismatchedScenarioMessages (bool)
 
virtual bool rejectMismatchedScenarioMessages () const
 
virtual bool canSimulate () const
 
DtCommunicationManagercommunicationManager ()
 
virtual
makVrfEvents::DtEventManager
eventManager ()
 
virtual bool canSleep () const
 
virtual bool aboutToLoadOrRewindScenario () const
 
virtual void setSmsValidationEnabled (bool b)
 
virtual bool logFrameRateStatistics () const
 
virtual void setLogFrameRateStatistics (bool yesOrNo)
 
virtual void sendServerLoadMessage (const DtString &error, int level=DtNlWarn)
 
virtual DtSimulationModelSetdefaultModelSet ()
 
virtual DtSimManagersimManager () const
 
virtual DtSimulationServicessimulationServices () const
 
virtual
DtImportExportScenarioDescriptionManager
importExportScenarioDescriptionManager () const
 
virtual DtResourceMonitorresourceMonitor () const
 
virtual DtRadarCoverageMonitorradarCoverageMonitor () const
 
virtual
DtTerrainProfileRequestManager
terrainProfileRequestManager () const
 
virtual DtFactoryManagerfactoryManager () const
 
virtual DtSnapshotManagersnapshotManager () const
 
virtual DtLocalObjectManagerlocalObjectManager () const
 
virtual DtSimObjectManagersimObjectManager () const
 
virtual DtDebugDrawManagerdebugDrawManager () const
 
virtual DtScriptedTaskManagerscriptedTaskManager () const
 
virtual DtScenarioEventManagerscenarioEventManager () const
 
virtual DtHazardAreaManagerhazardAreaManager () const
 
virtual
DtIntelCollectionAreaManager
intelCollectionAreaManager () const
 
virtual
DtScriptedObjectsMovementManager
ScriptedObjectsMovementManager () const
 
virtual DtDetonationManagerdetonationManager () const
 
virtual DtAmmunitionManagerammunitionManager () const
 
virtual DtFireManagerfireManager () const
 
virtual DtScenarioExtrasMgrscenarioExtrasMgr () const
 
virtual DtVrfParameterDbparameterDatabase () const
 
virtual DtGlobalPlanManagerglobalPlanManager ()
 
virtual DtStealthCommandsManagerstealthCommandsManager ()
 
virtual void setPhysicalWorld (DtPhysicalWorld *newPhysicalWorld)
 
virtual DtVrfNavAreaManagervrfNavAreaManager ()
 
virtual const DtVrfNavAreaManagervrfNavAreaManager () const
 
virtual void setVrfNavAreaManager (DtVrfNavAreaManager *newVrfNavAreaManager)
 
virtual DtSpawnSinkManagerspawnSinkManager ()
 
virtual const DtSpawnSinkManagerspawnSinkManager () const
 
virtual const
DtDiGuyCharacterDataManager
diGuyCharacterManager () const
 
virtual DtSimCommandDistributorsimCommandDistributor ()
 
virtual DtScenarioscenario () const
 
virtual const DtSimulationAddress & simulationAddress () const
 
virtual int sessionId () const
 
virtual void setTimeMultiplier (double)
 
virtual DtVrfStatusPublisherstatusPublisher () const
 
virtual void useMapDatum (const DtMapDatum &mapDatum)
 
virtual void setParameterDbLoaded (bool flag)
 
virtual void setDefaultParameterDbDirectory (const DtFilename &filename)
 
virtual DtFilename objectGroupsRoot () const
 
virtual bool reinitializeScenario ()
 
virtual void setFullyLoadTerrain (bool yesOrNo)
 
virtual bool fullyLoadTerrain () const
 
virtual void addPluginToLoad (const DtString &)
 
virtual void setLoadPluginsIfVersionMismatch (bool)
 
virtual bool loadPluginsIfVersionMismatch () const
 
virtual bool createAndInitPluginManager (DtVrfCreator *creator)
 
virtual void initializePluginCommandLineArguments (DtApplicationSettings &appInitializer)
 
virtual void runForDuration (double)
 
virtual void stopSimulationDurationTimer ()
 
virtual void processRunDurationComplete ()
 
virtual void setPublishingGlobalEnvironment (bool)
 
virtual void setFrameRateMode (const DtString &mode, DtReal deltaTime=-1)
 
virtual bool executeSimCommand (const DtSimCommand &simCommand)
 
virtual void unloadTerrain ()
 
virtual bool isOrbatEnabled () const
 
virtual double timeScale () const
 
virtual void setRunInTimeManagementMode (bool)
 
virtual DtSyncMatrixManagersyncMatrixManager ()
 
Scenario Management Functions

Scenario Management Functions

virtual bool importScenarioDescriptionFile (const DtFilename &file, const DtString &format, const std::map< std::string, std::string > &importData)
 
virtual DtString exportScenarioDescriptionFile (const DtFilename &file, const DtString &format, const std::map< std::string, std::string > &exportData)
 
virtual void setAppDataDir (const DtString &)
 
virtual DtFilename appDataDir () const
 
virtual void setSimulationAddress (const DtSimulationAddress &)
 
virtual void setUserDataDir (const DtString &)
 
virtual DtFilename userDataDir () const
 
virtual void setDataDir (const DtString &)
 
virtual DtFilename dataDir () const
 
virtual DtFilename sharedDataDir () const
 
virtual void setSharedDataDir (const DtFilename &path)
 
virtual DtFilename sharedDataRoot () const
 
virtual void setSharedDataRoot (const DtFilename &path)
 
virtual DtString sharedDataStem () const
 
virtual void setSharedDataStem (const DtString &path)
 
virtual void setAppIdRangeMax (int)
 
int appIdRangeMax () const
 
virtual bool loadScenario (const DtFilename &name, int scenarioRunId=0, bool isOrbatEnabled=false, bool createGlobalEnv=false, bool createGlobalDynamicTerrain=false)
 
virtual bool loadScenario (const DtScenario &scenario, int scenarioRunId=0, bool isOrbatEnabled=false, bool createGlobalEnv=false, bool createGlobalDynamicTerrain=false)
 
virtual void queueRollbackTo (DtInMemorySnapshot *chkp, int scenarioRunId=0)
 
virtual bool rollbackTo (DtInMemorySnapshot *chkp, int scenarioRunId=0)
 
virtual void clearSimulationObjects ()
 
virtual bool importScenario (const DtScenario &)
 
virtual bool importScenario (const DtFilename &)
 
virtual bool newScenario (const DtFilename &dbname=DtFilename::nullFilename(), const DtFilename &simulationModelSet=DtFilename::nullFilename())
 
DtIfScenarioStatusscenarioStatus ()
 
const DtIfScenarioStatusscenarioStatus () const
 
virtual void sendScenarioStatusMessage ()
 
virtual bool saveScenario (const DtFilename &savename, bool saveAsSip=false)
 
virtual bool takeSnapshot (DtInMemorySnapshot *)
 
virtual void rollbackToSimTime (double simTime)
 
virtual void takeSnapshot (bool makeBase)
 
virtual bool saveSnapshot (const DtFilename &saveFolder, DtCompressedFileTransporter &, DtIfSaveScenario *msg, const DtSimulationAddress &requestor)
 
virtual bool saveSimulationObjectGroup (DtFilename saveFolder, const DtString &groupName, int flags, std::set< DtUUID > &uuidsSaved, bool &savAsZipFile)
 
virtual bool createSimulationObjectGroup (const DtString &group, int flags, int force, const DtVector &geocentricLocation, double offsetRotation, bool storedInZipFile=false)
 
virtual void closeScenario (const DtFilename &terrainToOpen="", bool forceCloseAll=false)
 
virtual bool loadAdditionalObjectParameters (const DtFilename &paramsFileName, const DtReaderWriter::SearchPaths &searchPaths, bool preloadParameters=false)
 
virtual void setForceParameterDbReload (bool reload)
 
virtual bool forceParameterDbReload () const
 
virtual void setEnableResourceMonitor (bool b)
 
virtual bool isResourceMonitorEnabled () const
 
virtual const DtFilename & defaultTerrainDirectory ()
 
virtual void setDefaultTerrainDirectory (const DtFilename &directory)
 
virtual const DtFilename & defaultSimulationModelSetFilename ()
 
virtual void setDefaultSimulationModelSetFilename (const DtFilename &filename)
 
virtual const DtFilename & diGuyAnimationsFilename ()
 
virtual void setDIGuyAnimationsFilename (const DtFilename &filename)
 
void setClockMode (int clockMode)
 
virtual void setMsdlSidcMappingFile (const DtFilename &)
 
virtual const DtFilename & msdlSidcMappingFile () const
 
virtual void setCountryCodesMappingFile (const DtFilename &)
 
virtual const DtFilename & countryCodesMappingFile () const
 
Object and Entity Creation and Deletion
virtual void deleteObject (const DtUUID &name, bool andRemoveFromOrbat=true) const
 
virtual DtLocalObjectcreateWaypoint (const DtVector &localPosition, const DtString &uniqueName=DtString::nullString()) const
 
virtual DtLocalObjectcreateRoute (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const
 
virtual DtLocalObjectcreatePhaseLine (const DtVector &dbPoint1, const DtVector &dbPoint2, const DtString &uniqueName=DtString::nullString()) const
 
virtual DtLocalObjectcreateControlArea (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const
 
virtual DtLocalObjectcreateObstacle (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const
 
virtual DtLocalObjectcreateEntity (const DtEntityType &entityType, DtForceType force, const DtVector &dbPosition, DtReal heading, const DtString &entityName=DtString::nullString(), bool allowBlocking=true, std::list< DtAdminContent * > *initialAdminContent=0, bool addToOrbat=true) const
 
virtual DtLocalObjectcreateAggregate (const DtEntityType &aggregateType, DtForceType force, const DtVector &localPosition, DtReal heading, const std::vector< DtUUID > &subordinates=std::vector< DtUUID >(), const DtString &aggregateName=DtString::nullString(), bool addToOrbat=true) const
 
virtual DtLocalObjectcreateAggregate (const DtEntityType &aggregateType, DtForceType force, const DtVector &localPosition, DtReal heading, bool createSubordinates, const DtString &aggregateName=DtString::nullString(), bool allowBlocking=true, bool addToOrbat=true) const
 
virtual bool addSubordinate (DtLocalObject *subordinate, DtLocalObject *aggregate)
 
virtual bool removeSubordinate (DtLocalObject *subordinate, DtLocalObject *aggregate)
 
Plan and Task Management
virtual void assignTask (const DtLocalObject *entity, const DtSimTask &task)
 
virtual void sendSetDataRequest (const DtLocalObject *entity, const DtSetDataRequest &request)
 
virtual void assignPlanByUUID (const DtUUID &, const DtPlan &plan)
 
virtual void abandonPlan (const DtLocalObject *entity)
 
virtual void restartPlan (const DtLocalObject *entity)
 
Object Output Logging

Methods for managing the Object Console output of specific simulation objects.

virtual void logObjectConsoleToFile (DtLocalObject *object, DtFilename filename=DtFilename::nullFilename())
 
virtual void stopLoggingObjectConsoleToFile (DtLocalObject *object)
 
virtual void setObjectConsoleNotificationLevel (DtLocalObject *object, DtNotifyLevelType level)
 
virtual bool reuseEntityIdentifiersOnScenarioLoad () const
 
virtual void setReuseEntityIdentifiersOnScenarioLoad (bool)
 
virtual void setTaskVisualizationPublicationMode (DtTaskVisualizationPublicationMode mode)
 
virtual
DtTaskVisualizationPublicationMode 
taskVisualizationPublicationMode () const
 
virtual void setUseDrawControlForTaskVisualizations (bool)
 
virtual bool useDrawControlForTaskVisualizations () const
 
virtual DtTerrainInterfaceterrainInterface ()
 
virtual const DtTerrainInterfaceterrainInterface () const
 
virtual DtPhysicalWorldphysicalWorld ()
 
virtual const DtPhysicalWorldphysicalWorld () const
 
virtual DtCommModelManagercommModelManager ()
 
virtual const DtCommModelManagercommModelManager () const
 
virtual
DtSimTerrainRequestManager
simTerrainRequestManager ()
 
virtual const
DtSimTerrainRequestManager
simTerrainRequestManager () const
 
virtual DtU32 scenarioCapabilities () const
 
virtual void setScenarioCapabilities (DtU32 v)
 
virtual void setScenarioCapability (DtU32 v, bool)
 
virtual DtString applicationType () const
 
virtual void setApplicationType (const DtString &type)
 
virtual void setAssertOnBlockingTerrainCalls (bool b)
 
virtual bool assertOnBlockingTerrainCalls () const
 
virtual void setMetocEnable (bool b)
 
virtual bool metocEnable () const
 
DtVrfCreatorvrfCreator ()
 
const DtVrfCreatorvrfCreator () const
 
virtual void addPreLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreLoadScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreLoadScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreScenarioReinitializeCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreScenarioReinitializeCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostScenarioReinitializeCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostScenarioReinitializeCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreCreateSimulationObjectGroupCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreCreateSimulationObjectGroupCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostLoadScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostLoadScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostCreateSimulationObjectGroupCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostCreateSimulationObjectGroupCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreImportScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreImportScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostImportScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostImportScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreSaveScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreSaveScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostSaveScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostSaveScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreSaveSimulationObjectGroupsCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreSaveSimulationObjectGroupsCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostSaveSimulationObjectGroupsCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostSaveSimulationObjectGroupsCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addScenarioPauseCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removeScenarioPauseCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addScenarioRunCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removeScenarioRunCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPreScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePreScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void addPostTickCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePostTickCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void setTimeToQuit (bool)
 
virtual bool timeToQuit () const
 
VRF4API_METHOD
DtLocalObjectManager
vrfObjectManager ()
 
VRF4API_METHOD
DtCommunicationManager
exerciseConn ()
 

Static Public Member Functions

static void runDurationCompleteCallback (void *)
 
static void objectParametersOpCallback (DtSimMessage *msg, void *usr)
 

Protected Types

typedef std::pair< std::string,
bool
ActionCategory
 
typedef std::map< std::string,
ActionCategory
ActionCategories
 
typedef std::map< DtString,
SimulationObjectGroupInformation
StoredSimulationObjectGroupInformation
 
typedef std::vector
< DtLoadOrderOfBattleHandler * > 
SimulationObjectGroupsToBeCreated
 

Protected Member Functions

virtual void processScenarioDescription (DtSimMessage *)
 
virtual void processSetScenarioFilename (DtSimMessage *)
 
virtual void processSetRunDuration (DtSimMessage *)
 
virtual void processActionCategoriesRequest (DtSimMessage *msg)
 
virtual void processScenarioStatusRequest (DtSimMessage *msg)
 
virtual bool beginFrame ()
 
virtual bool advanceFrame ()
 
virtual DtFilename spawnManagerTemplateFile (const DtScenarioExplorer &) const
 
virtual void loadAllPlugins ()
 
virtual bool loadComponentAttachmentTable (const DtFilename &filename)
 
virtual bool loadTerrain (const DtFilename &filename)
 
virtual DtFilename findTerrainFile (const DtFilename &startFile, const std::vector< DtFilename > &searchPaths, const std::string &extension) const
 
virtual bool loadOrderOfBattle (const DtScenario &scenario, DtLoadScenarioData &)
 
virtual bool loadOrderOfBattle (const DtInMemorySnapshot::OOB &)
 
virtual bool writeOrderOfBattle (const DtScenario &scenario) const
 
virtual bool writeOrderOfBattle (DtInMemorySnapshot::OOB &) const
 
virtual bool loadScenarioScripts (const DtFilename &filename)
 
virtual bool loadScenarioScriptsFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename)
 
virtual bool loadScenarioScripts (const std::string &buffer)
 
virtual bool loadOrbat (const DtFilename &filename, DtOrbatManager *intoOm=0, bool clearBeforeLoading=true)
 
virtual bool loadOrbatFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename, DtOrbatManager *intoOm=0, bool clearBeforeLoading=true)
 
virtual bool loadOrbat (const std::string &buffer, DtOrbatManager *intoOm=0, bool clearBeforeLoading=true)
 
virtual void prepareForScenarioReinitialize ()
 
virtual bool isScenarioReinitializing () const
 
virtual bool loadParameterDb (const DtFilename &filename, const DtReaderWriter::SearchPaths &searchPaths, bool clearLoadedObjects=true, bool preloadParameters=false)
 
virtual bool loadObjectParametersDBFile (const DtFilename &opdFile, const DtReaderWriter::SearchPaths &searchPaths, bool clearLoadedObjects=true, bool preloadParameters=false)
 
virtual bool loadPhysicalWorldFile (const DtFilename &file, bool force=false)
 
virtual bool loadDetonationParametersFile (const DtFilename &file, bool force=false)
 
virtual bool loadTerrainDeformationParametersFile (const DtFilename &file, bool force=false)
 
virtual bool loadAmmunitionParametersFile (const DtFilename &file, bool force=false)
 
virtual bool loadPlans (const DtFilename &filename)
 
virtual bool loadPlansFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename)
 
virtual bool loadPlans (const std::string &buffer)
 
virtual bool loadGlobalPlans (const DtFilename &filename)
 
virtual bool loadGlobalPlansFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename)
 
virtual void loadHostilityAndExtras (const DtScenarioExplorer &se)
 
virtual void loadHostilityAndExtrasFromZipFile (const DtFilename &scenarioZipFile, const DtScenarioExplorer &se)
 
virtual void loadHostilityAndExtras (const std::string &buffer)
 
virtual void loadActivities (const DtScenarioExplorer &)
 
virtual void loadModelSetFiles (const DtScenarioExplorer &)
 
virtual void loadActionCategories (const DtFilename &f)
 
virtual bool loadForceHostility (const DtFilename &filename, bool clear=true)
 
virtual bool loadForceHostilityFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename, bool clear=true)
 
virtual bool loadScenarioExtras (const DtFilename &filename)
 
virtual bool loadScenarioExtrasFromZipFile (const DtFilename &, const DtFilename &filename)
 
virtual bool loadScenarioExtras (const std::string &buffer)
 
virtual void processObjectParametersOp (DtSimMessage *msg)
 
virtual void createAndInitScenarioLoadManager ()
 
virtual void emptyParametersDB ()
 
virtual void setAutoReorganization (bool onOff)
 
virtual DtVrfPluginloadPlugin (const DtString &)
 
virtual bool setupCommModelsForScenario (const DtScenarioExplorer &e)
 
virtual void updateReadyStatus ()
 
virtual void clearAllSimulationModelSetInformation ()
 
virtual void initializeCgfConsoleCommands ()
 
virtual void processCloseScenarioEvent (const makVrfEvents::DtEvent &)
 
virtual void processLoadScenarioEvent (const makVrfEvents::DtEvent &)
 
virtual bool createDIGuyCharacterManager (const DtFilename &diGuyAnimationsFile)
 
void setVrfCreator (DtVrfCreator *creator)
 
virtual bool differingModelSets (DtScenario *) const
 
virtual void simControlEvent (const makVrfEvents::DtEvent &)
 
virtual void clearObjectsAwaitingDiscovery ()
 
virtual void processObjectsAwaitingDiscovery ()
 
bool ownVrfCreator () const
 
void setOwnVrfCreator (bool yesOrNo)
 

Static Protected Member Functions

static void scenarioDescriptionCallback (DtSimMessage *, void *usr)
 
static void setScenarioFilenameCallback (DtSimMessage *, void *usr)
 
static void setRunDurationCallback (DtSimMessage *, void *usr)
 
static void actionCategoriesRequestCallback (DtSimMessage *msg, void *usr)
 
static void scenarioStatusRequestCallback (DtSimMessage *msg, void *usr)
 

Protected Attributes

DtVrfSimOptionsInterfacemySimOptions
 
DtSimulationAddress mySimulationAddress
 
DtU32 mySessionId
 
bool myOK
 
bool myTimeToQuit
 
DtVrfPluginManagermyPluginManager
 
std::vector< DtStringmyPluginsToLoad
 
bool myLoadPluginsIfVersionMismatch
 
DtTerrainInterfacemyTerrainInterface
 
DtPhysicalWorldmyPhysicalWorld
 
DtVrfNavAreaManagermyVrfNavAreaManager
 
DtSpawnSinkManagermySpawnSinkManager
 
DtCommModelManagermyCommModelManager
 
DtSimTerrainRequestManagermySimTerrainRequestManager
 
DtCommunicationManagermyCommunicationManager
 
DtSimManagermySimManager
 
DtCreateObjectServiceInterfacemyCreateObjectService
 
DtScenarioServiceInterfacemyScenarioService
 
DtScenariomyScenario
 
DtVrfStatusPublishermyStatusPublisher
 
DtLocalObjectManagermyObjectManager
 
DtDebugDrawManagermyDebugDrawManager
 
DtDetonationManagermyDetonationManager
 
DtAmmunitionManagermyAmmunitionManager
 
DtScriptedTaskManagermyScriptedTaskManager
 
DtScenarioEventManagermyScenarioEventManager
 
DtHazardAreaManagermyHazardAreaManager
 
DtIntelCollectionAreaManagermyIntelCollectionAreaManager
 
DtScriptedObjectsMovementManagermyScriptedObjectsMovementManager
 
DtFireManagermyFireManager
 
DtObjectConsoleManagermyObjectConsoleManager
 
DtManagedObjectListManagermyFilteredObjectListManager
 
DtOrbatManagermyOrbatManager
 
DtObjectGeometricModelsManagermyObjectModelsManager
 
DtVrfObjectPlanAdministratormyPlanAdministrator
 
DtSimInternalCommunicationManagermySimInternalCommunicationManager
 
DtDiGuyCharacterDataManagermyCharacterMgr
 
bool myCreatedCharacterManager
 
DtLuaObjectSerializermyLuaObjectSerializer
 
DtResourceMonitormyResourceMonitor
 
DtRadarCoverageMonitormyRadarCoverageMonitor
 
DtTerrainProfileRequestManagermyTerrainProfileRequestManager
 
DtVrfParameterDbmyParameterDatabase
 
DtEmbeddedEntityInfoManagermyEmbeddedEntityInfoManager
 
bool myForceParameterDbReload
 
DtGlobalPlanManagermyGlobalPlanManager
 
DtHostilityManagermyHostilityManager
 
DtEngagementZonesManagermyEngagementZonesManager
 
DtScenarioExtrasMgrmyScenarioExtrasManager
 
DtFactoryManagermyFactoryManager
 
DtStealthCommandsManagermyStealthCommandsManager
 
DtSimCommandDistributormySimCommandDistributor
 
DtFilename myVrfTerrainPathDirectory
 
DtFilename myDefaultTerrainDirectory
 
DtFilename myDefaultSimulationModelSetFilename
 
DtFilename myDIGuyAnimationsFilename
 
DtFilename myMsdlSidcMappingFile
 
DtFilename myCountryCodesMappingFile
 
bool myParameterDbLoaded
 
DtFilename myCurrentParameterDatabaseFilename
 
DtFilename myDefaultParameterDbDirectory
 
DtCallbackList< const
DtFilename & > 
myPreLoadTerrainCallbacks
 
DtCallbackList< const
DtFilename & > 
myPostLoadTerrainCallbacks
 
DtCallbackList< DtScenario & > myPreLoadScenarioCallbacks
 
DtCallbackList< const
DtScenario & > 
myPostLoadScenarioCallbacks
 
DtCallbackList< DtScenario & > myPreScenarioReinitializeCallbacks
 
DtCallbackList< const
DtScenario & > 
myPostScenarioReinitializeCallbacks
 
DtCallbackList< DtScenario & > myPreCreateSimulationObjectGroupCallbacks
 
DtCallbackList< const
DtScenario & > 
myPostCreateSimulationObjectGroupCallbacks
 
DtCallbackList< DtScenario & > myPreImportScenarioCallbacks
 
DtCallbackList< const
DtScenario & > 
myPostImportScenarioCallbacks
 
DtCallbackList< DtScenario & > myPreSaveScenarioCallbacks
 
DtCallbackList< const
DtScenario & > 
myPostSaveScenarioCallbacks
 
DtCallbackList< DtScenario & > myPreSaveSimulationObjectGroupsCallbacks
 
DtCallbackList< const
DtScenario & > 
myPostSaveSimulationObjectGroupsCallbacks
 
DtNoArgumentCallbackList myPreCloseScenarioCallbacks
 
DtNoArgumentCallbackList myPostCloseScenarioCallbacks
 
DtNoArgumentCallbackList myScenarioRunCallbacks
 
DtNoArgumentCallbackList myScenarioPauseCallbacks
 
DtNoArgumentCallbackList myPreScenarioRewindCallbacks
 
DtNoArgumentCallbackList myPostScenarioRewindCallbacks
 
DtNoArgumentCallbackList myPostTickCallbacks
 
DtSyncMatrixManagermySyncMatrixManager
 
bool myOwnVrfCreatorFlag
 
DtVrfCreatormyVrfCreator
 
bool myFullyLoadTerrain
 
bool myAssertOnBlockingTerrainCalls
 
DtSimulationModelSetmyDefaultModelSet
 
DtScenario myScenarioToLoad
 
bool myCreateGlobalEnvironment
 
bool myCreateGlobalDynamicTerrain
 
bool myCreatedGlobalEnvironment
 
bool myCreatedGlobalDynamicTerrain
 
bool myWasPaused
 
DtImportExportScenarioDescriptionManagermyImportScenarioDescriptionManager
 
DtConsoleCommandOwnermyConsoleCommands
 
ActionCategories myActionCategories
 
DtIfScenarioStatusmyScenarioStatus
 
bool myPublishingGlobalEnvironment
 
bool myAboutToLoadOrRewindScenario
 
bool myReinitializingScenario
 
bool myMetocEnabled
 
DtTaskVisualizationPublicationMode myTaskVisualizationPublicationMode
 
bool myUseDrawControlForTaskVisualizations
 
bool myReuseEntityIdentifiersOnScenarioLoad
 
DtRwActivities myActivities
 
bool mySmsValidationEnabled
 
DtSnapshotManagermySnapshotManager
 
DtSimObjectManagermySimObjectManager
 
std::vector< DtFilename > myObjectGroupsRoot
 
StoredSimulationObjectGroupInformation myStoredSimulationObjectGroupInformation
 
int myRollbackToId
 
bool myCanSimulate
 
bool myIsLoaded
 
bool myHasModelSetInformationLoadedAfterClose
 
int myReloadDelay
 
bool myRejectMismatchedScenarioMessages
 
DtU32 myScenarioCapabilities
 
int myAppIdRangeMax
 
std::set< DtFilename > myLoadedModelSets
 
DtInMemorySnapshotmyQueuedRollback
 
int myQueuedRollbackScenarioRunId
 
DtScenarioLoadManagermyScenarioLoadManager
 
SimulationObjectGroupsToBeCreated mySimulationObjectGroupsToBeCreated
 

Private Member Functions

 DtCgf (const DtCgf &original)
 
DtCgfoperator= (const DtCgf &original)
 
static void simCommandCallback (DtSimMessage *msg, void *usr)
 
virtual void processSimCommand (DtSimMessage *msg)
 
static void deferredLoadScenarioCallback (void *data)
 
virtual void processDeferredLoadScenario ()
 
virtual void processLoadScenario (const DtScenario *=0, const DtInMemorySnapshot *=0)
 
static void deferredReinitializeScenarioCallback (void *data)
 
virtual void processDeferredReinitializeScenario ()
 
static void deferredRollbackCallback (void *data)
 
virtual void processDeferredRollback ()
 
static void deferredImportScenarioCallback (void *data)
 
virtual void processDeferredImportScenario ()
 
static void deferredRewindCallback (void *data)
 
virtual void processDeferredRewind ()
 

Member Typedef Documentation

typedef std::pair<std::string, bool> DtCgf::ActionCategory
protected

Map of ID and screen string for action categories. Only used by the front-end Not currently set up for modification unless editing original actionCategories.tsk.

typedef std::map<std::string, ActionCategory> DtCgf::ActionCategories
protected

Constructor & Destructor Documentation

DtCgf::DtCgf ( const DtSimulationAddress &  addr,
const DtU32 &  capabilities = 0xffff 
)

Constructor. Object is not usable until init is called. addr is the DIS/RPR site Id/application Id address of the simulation. sessionId indicates the session in which this CGF is participating. VR-Forces apps with the same session Id are capable of exchanging interface messages (and therefore capable of controlling one another, i.e. creating and destroying entities and objects, tasking, etc.).

virtual DtCgf::~DtCgf ( )
virtual

Destructor.

DtCgf::DtCgf ( const DtCgf original)
private

not implemented. Copying this class is not supported.

Member Function Documentation

virtual bool DtCgf::init ( DtCommunicationManager conn,
DtU32  sessionId = 1,
DtVrfCreator creator = 0,
bool  checkDataDir = true 
)
virtual

Init function - creates and initializes all the factories, members, and other objects used by the cgf to perform the simulation. Note that the order in which components are created is the order in which they are ticked.

Parameters
connA preexisting communication manager. The cgf does not take ownership of the connect - the user is responsible for deleting it.
creatorAn optional parameter which defaults to 0. If not specified, the cgf will create its own DtVrfCreator, and maintain ownership over it. If the creator is user specified, then the cgf will maintain knowledge of it, but will not be responsible for ownership - the user must delete it.
entityAdvisoryAn estimate of the expected number of sim objects to be simulated. Defaults to 100.
Note
Because the creator is now used to create the terrain database, which is done in the loadTerrain() call, the creator must not be deleted until the cgf class is destroyed (or at the least, no more loadTerrain() calls are made.
The communicationManager also must not be deleted until after the cgf is destroyed.
virtual const DtVrfSimOptionsInterface* DtCgf::simOptions ( ) const
virtual

Access sim options object.

virtual void DtCgf::setSimOptions ( const DtVrfSimOptionsInterface )
virtual

Takes ownership.

virtual void DtCgf::tick ( )
virtual

Tick the simulation engine, allowing our internal clock to determine the current time.

virtual void DtCgf::sendFinalStatus ( )
virtual

Sends a final status which is to indicate this cgf is being deleted and ticks the communication manager to send out.

virtual bool DtCgf::importScenarioDescriptionFile ( const DtFilename &  file,
const DtString format,
const std::map< std::string, std::string > &  importData 
)
virtual

Imports the specified scenario description file into the current scenario.

virtual DtString DtCgf::exportScenarioDescriptionFile ( const DtFilename &  file,
const DtString format,
const std::map< std::string, std::string > &  exportData 
)
virtual

Exports the information from the current scenario to the specified file format using the supplied file as the base. Will return the filename saved if successful, or empty filename if failure.

virtual void DtCgf::setAppDataDir ( const DtString )
virtual

Sets the app data directory. Must be called before init.

virtual DtFilename DtCgf::appDataDir ( ) const
virtual

Imports the specified scenario description file into the current scenario.

virtual void DtCgf::setSimulationAddress ( const DtSimulationAddress &  )
virtual

Set the simulation address to put into the communicationManager.

virtual void DtCgf::setUserDataDir ( const DtString )
virtual

Sets the user data directory. Must be called before init.

virtual DtFilename DtCgf::userDataDir ( ) const
virtual

Imports the specified scenario description file into the current scenario.

virtual void DtCgf::setDataDir ( const DtString )
virtual

Sets the data directory. Must be called before init.

virtual DtFilename DtCgf::dataDir ( ) const
virtual

Imports the specified scenario description file into the current scenario.

virtual DtFilename DtCgf::sharedDataDir ( ) const
virtual

Get the shared data directory. The shared directory can be referenced in other directories using The macro string "$(SHARED_DATA_DIR)".

virtual void DtCgf::setSharedDataDir ( const DtFilename &  path)
virtual

Imports the specified scenario description file into the current scenario.

virtual DtFilename DtCgf::sharedDataRoot ( ) const
virtual

Imports the specified scenario description file into the current scenario.

virtual void DtCgf::setSharedDataRoot ( const DtFilename &  path)
virtual

Imports the specified scenario description file into the current scenario.

virtual DtString DtCgf::sharedDataStem ( ) const
virtual

Imports the specified scenario description file into the current scenario.

virtual void DtCgf::setSharedDataStem ( const DtString path)
virtual

Imports the specified scenario description file into the current scenario.

virtual void DtCgf::setAppIdRangeMax ( int  )
virtual

Upper range for app id in case we create more than 65K objects.

int DtCgf::appIdRangeMax ( ) const

Imports the specified scenario description file into the current scenario.

virtual bool DtCgf::loadScenario ( const DtFilename &  name,
int  scenarioRunId = 0,
bool  isOrbatEnabled = false,
bool  createGlobalEnv = false,
bool  createGlobalDynamicTerrain = false 
)
virtual

Load the specified scenario file, making it the current scenario. All objects in the scenario will be loaded, and the object map will not be processed. Calls loadScenario(const DtScenario& scenario). If supplied, the new scenario run id.

virtual bool DtCgf::loadScenario ( const DtScenario scenario,
int  scenarioRunId = 0,
bool  isOrbatEnabled = false,
bool  createGlobalEnv = false,
bool  createGlobalDynamicTerrain = false 
)
virtual

Load the specified scenario, making it the current scenario. All objects in the scenario will be loaded, and the object map will not be processed. Note that this initiates the load scenario process, closing the current scenario, and then registering the post-tick callback deferredLoadScenario to complete the load operation. Calling tick() will complete the load. If supplied, the new scenario run id.

virtual void DtCgf::queueRollbackTo ( DtInMemorySnapshot chkp,
int  scenarioRunId = 0 
)
virtual

Queues a rollback to the scenario at the given in memory snapshot. If supplied, the new scenario run id.

virtual bool DtCgf::rollbackTo ( DtInMemorySnapshot chkp,
int  scenarioRunId = 0 
)
virtual

Rolls back to the scenario at the given in memory snapshot. If supplied, the new scenario run id.

virtual void DtCgf::clearSimulationObjects ( )
virtual

Clears out all simulation objects in scenario.

virtual bool DtCgf::importScenario ( const DtScenario )
virtual

Imports the scenario into the currently loaded scenario. Terrain and simulation model sets will be ignored for the currently loaded terrain and simulation model set.

virtual bool DtCgf::importScenario ( const DtFilename &  )
virtual

Imports the specified scenario description file into the current scenario.

virtual bool DtCgf::newScenario ( const DtFilename &  dbname = DtFilename::nullFilename(),
const DtFilename &  simulationModelSet = DtFilename::nullFilename() 
)
virtual

Create a new scenario, making it the current scenario. If a terrain filename is specified, loads the terrain database after the first call to tick(). Loads the parameter database file. If no parameter database filename is given, loads the default parameter database.

Returns
true if successful, false otherwise.
DtIfScenarioStatus* DtCgf::scenarioStatus ( )
inline

Returns the scenario status object.

const DtIfScenarioStatus* DtCgf::scenarioStatus ( ) const
inline

Imports the specified scenario description file into the current scenario.

virtual void DtCgf::sendScenarioStatusMessage ( )
virtual

Imports the specified scenario description file into the current scenario.

virtual bool DtCgf::saveScenario ( const DtFilename &  savename,
bool  saveAsSip = false 
)
virtual

Save the current scenario. Only local objects will be saved into the scenario – objects from other back-ends will not be saved and an object map will not be created.

virtual bool DtCgf::takeSnapshot ( DtInMemorySnapshot )
virtual

Snapshots scenario to given in memory structure.

virtual void DtCgf::rollbackToSimTime ( double  simTime)
virtual

Rolls back the snapshot to the current simulation time. Note that this is only good for this cgf. In a multiple cgf environment calling this method will have unpredictable, and possibly buggy, results.

virtual void DtCgf::takeSnapshot ( bool  makeBase)
virtual

Calls to Snapshot manager to snapshot scenario. If makeBase is true makes this snapshot the new "base" snapshot (which is one the front-end can rewind to by a single click)

virtual bool DtCgf::saveSnapshot ( const DtFilename &  saveFolder,
DtCompressedFileTransporter ,
DtIfSaveScenario msg,
const DtSimulationAddress &  requestor 
)
virtual

Saves the Snapshot to the disk and sends it to the front-end requested as well as sends back a Snapshot saved message with the status of the save.

virtual bool DtCgf::saveSimulationObjectGroup ( DtFilename  saveFolder,
const DtString groupName,
int  flags,
std::set< DtUUID > &  uuidsSaved,
bool savAsZipFile 
)
virtual

Saves enough information to create a simulation object group. All placements will be saved from center of mass, except for any location that is part of a task, plan or global plan. See scenario.h DtGroupCreationFlags for flags. Will save all files in the directory specified by the saveFolder with the files groupName.

virtual bool DtCgf::createSimulationObjectGroup ( const DtString group,
int  flags,
int  force,
const DtVector geocentricLocation,
double  offsetRotation,
bool  storedInZipFile = false 
)
virtual

Creates the simulation object group specified by the name as long as it exists in the objectGroups directory of the current simulation model set. The flags are defined in scenario.h, however, the terrain flag is only respected as saved in the simulation object group order of battle file. The offset rotation is the amount to rotate the entire simulation object group around the center of mass (including changing headings). Angle is in radians. If stored in zip file is true and a .sogx file with the group name exists use that, else use directory root.

virtual void DtCgf::closeScenario ( const DtFilename &  terrainToOpen = "",
bool  forceCloseAll = false 
)
virtual

Close the current scenario Removes all objects, unloads terrain. If terrainToOpen is specified will not unload the terrain if the terrain to be opened is the same one that is currently opened.

virtual bool DtCgf::loadAdditionalObjectParameters ( const DtFilename &  paramsFileName,
const DtReaderWriter::SearchPaths searchPaths,
bool  preloadParameters = false 
)
virtual

Loads an additional OPD file. Any types specified in the additional parameter database that already exist are replaced with the new entries. All others are added to the current set of parameters. searchPaths is the list of additional search paths from included SMSs.

virtual void DtCgf::run ( )
virtual

Put the simulation engine into run mode. By default, the CGF starts out in run mode.

virtual void DtCgf::pause ( )
virtual

Put the simulation engine into pause mode.

virtual std::string DtCgf::protocol ( ) const
virtual

Given the network manager, return the first protocol driver found and it's descriptive text.

virtual void DtCgf::rewind ( int  scenarioRunId = 0)
virtual

Rewind the simulation engine. Removes all objects, and loads last saved scenario files, if they exist. Does not unload terrain. Note that this initiates the rewind scenario process. It registers the post-tick callback deferredRewindScenario to complete the rewind operation. If supplied the new scenario run id.

virtual void DtCgf::setRejectMismatchedScenarioMessages ( bool  )
virtual

Sets whether or not to reject mismatched scenario run messages (default is true). Will set in scenario manager.

virtual bool DtCgf::rejectMismatchedScenarioMessages ( ) const
virtual
virtual void DtCgf::setForceParameterDbReload ( bool  reload)
virtual

Forces loadScenario to reload the OPD when loadParameterDb() is called. Normally, the parameter database is only reloaded if it has a different name than the one currently loaded.

Note
This only effects scenario loads, not running scenarios.
virtual bool DtCgf::forceParameterDbReload ( ) const
virtual

Forces loadScenario to reload the OPD when loadParameterDb() is called. Normally, the parameter database is only reloaded if it has a different name than the one currently loaded.

Note
This only effects scenario loads, not running scenarios.
virtual void DtCgf::setEnableResourceMonitor ( bool  b)
virtual

Enable/disable resource manager. When the resource manager is enabled, the sim will respond to network requests for resource status of various entities.

virtual bool DtCgf::isResourceMonitorEnabled ( ) const
virtual

Enable/disable resource manager. When the resource manager is enabled, the sim will respond to network requests for resource status of various entities.

virtual bool DtCgf::canSimulate ( ) const
inlinevirtual

Whether or not the cgf is ready to simulate.

DtCommunicationManager* DtCgf::communicationManager ( )
inline
virtual makVrfEvents::DtEventManager* DtCgf::eventManager ( )
virtual
virtual bool DtCgf::canSleep ( ) const
virtual
virtual bool DtCgf::aboutToLoadOrRewindScenario ( ) const
inlinevirtual

Whether or not this cgf is about to rewind, rollback or load.

virtual void DtCgf::setSmsValidationEnabled ( bool  b)
virtual

Enables or disabled the validation of SMSs when a scenario is created or loaded. Defaults to true. If disabled, protocol and other restrictions will not be applied when loading an SMS.

virtual const DtFilename& DtCgf::defaultTerrainDirectory ( )
virtual

Set/Get the default directory where terrain databases are searched for. Initialized from the VRF_defaultTerrainDatabasePath variable in the vrfSim.mtl config file. When searching for a given terrain database to load, it searches in the following order:

  1. Searches for terrain file using the filename in the scenario file (absolute path if one is specified, otherwise relative to the application path)
  2. Searches in the default terrain directory, given by the VRF_defaultTerrainDatabasePath
  3. Searches in in the VRF_TERRAIN_PATH environment variable, if the the variable is specified.

virtual void DtCgf::setDefaultTerrainDirectory ( const DtFilename &  directory)
virtual

Set/Get the default directory where terrain databases are searched for. Initialized from the VRF_defaultTerrainDatabasePath variable in the vrfSim.mtl config file. When searching for a given terrain database to load, it searches in the following order:

  1. Searches for terrain file using the filename in the scenario file (absolute path if one is specified, otherwise relative to the application path)
  2. Searches in the default terrain directory, given by the VRF_defaultTerrainDatabasePath
  3. Searches in in the VRF_TERRAIN_PATH environment variable, if the the variable is specified.

virtual bool DtCgf::logFrameRateStatistics ( ) const
virtual
virtual void DtCgf::setLogFrameRateStatistics ( bool  yesOrNo)
virtual
virtual void DtCgf::sendServerLoadMessage ( const DtString error,
int  level = DtNlWarn 
)
virtual

Sends a load message with the particular info level.

virtual const DtFilename& DtCgf::defaultSimulationModelSetFilename ( )
virtual

Set/get the name of the default simulation model set to load (what to load when no parameter database is specified). By default, this file is ...sms. This simulation model set will be loaded on startup.

virtual void DtCgf::setDefaultSimulationModelSetFilename ( const DtFilename &  filename)
virtual

Set/get the name of the default simulation model set to load (what to load when no parameter database is specified). By default, this file is ...sms. This simulation model set will be loaded on startup.

virtual const DtFilename& DtCgf::diGuyAnimationsFilename ( )
virtual

Set/get the name of the DI-Guy configuration files to load The Animations file is an mtl file used to extend and more fully define the animations from the character data file.

virtual void DtCgf::setDIGuyAnimationsFilename ( const DtFilename &  filename)
virtual

Set/get the name of the DI-Guy configuration files to load The Animations file is an mtl file used to extend and more fully define the animations from the character data file.

void DtCgf::setClockMode ( int  clockMode)

Configuration for the clock to be used for absolute time stamping (in windows)

virtual void DtCgf::setMsdlSidcMappingFile ( const DtFilename &  )
virtual

Set/get the msdl mapping file for SIDC codes to Dis Enumerations.

virtual const DtFilename& DtCgf::msdlSidcMappingFile ( ) const
virtual

Set/get the msdl mapping file for SIDC codes to Dis Enumerations.

virtual void DtCgf::setCountryCodesMappingFile ( const DtFilename &  )
virtual

Set/get the country codes to Dis Enumerations.

virtual const DtFilename& DtCgf::countryCodesMappingFile ( ) const
virtual

Set/get the country codes to Dis Enumerations.

virtual DtSimulationModelSet* DtCgf::defaultModelSet ( )
virtual

Returns default model set. If one does not exist, will create and load one from the current default model set filename.

virtual void DtCgf::deleteObject ( const DtUUID name,
bool  andRemoveFromOrbat = true 
) const
virtual

All VR-Force's objects can be deleted by their unique name regardless of their type.

virtual DtLocalObject* DtCgf::createWaypoint ( const DtVector localPosition,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Create a new waypoint. Returns a pointer to a newly created DtLocalObject representing the waypoint.

Parameters
localPositionis the position of the waypoint in the coordinate system of the loaded terrain database.
uniqueNameis the name of the new waypoint. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtLocalObject* DtCgf::createRoute ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Create a new route. Returns a pointer to a newly created DtLocalObject representing the route.

Parameters
verticesis the ordered DtList of DtVector*s, making up the vertices in the route, in local database coordinates. DtCgf does not take ownership of this list so it is the caller's responsibility to destroy it.
uniqueNameis the name of the new route. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtLocalObject* DtCgf::createPhaseLine ( const DtVector dbPoint1,
const DtVector dbPoint2,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Create a new phase line. Returns a pointer to a newly created DtLocalObject representing the phase line. Phase lines are a 2-D line segment formed by 2 vertices.

Parameters
dbPoint1is the position of the 1st vertex in local coordinates.
dbPoint2is the position of the 2nd vertex in local coordinates.
uniqueNameis the name of the new phase line. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtLocalObject* DtCgf::createControlArea ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Create a new control area. Returns a pointer to a newly created DtLocalObject representing the control area.

Parameters
verticesis the ordered DtList of DtVector*s, making up the vertices in the control area, in local database coordinates. The vertices must form a convex polygon.
uniqueNameis the name of the new control area. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtLocalObject* DtCgf::createObstacle ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Create a new obstacle. Returns a pointer to a newly created DtLocalObject representing the obstacle.

Parameters
verticesis the ordered DtList of DtVector*s, making up the vertices in the obstacle, in local database coordinates. The vertices must form a convex polygon.
uniqueNameis the name of the new obstacle. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtLocalObject* DtCgf::createEntity ( const DtEntityType &  entityType,
DtForceType  force,
const DtVector dbPosition,
DtReal  heading,
const DtString entityName = DtString::nullString(),
bool  allowBlocking = true,
std::list< DtAdminContent * > *  initialAdminContent = 0,
bool  addToOrbat = true 
) const
virtual

Create a new entity of the given force type and object type, at the given position and heading.

Parameters
entityTypethe DIS/RPR 7-byte enumeration. See EntityTypes.h for enumerations.
forcethe DIS/RPR enumeration for force types, extended to allow up to 255 different types. See disEnums.h for the standard enumerations.
dbPositionthe coordinate system of the loaded terrain database.
headingheading in radians, measured clockwise from North.
entityNamethe object name of the entity. By default, it is set to a null string, indicating that VR-Forces should generate a new name for the entity.
allowBlockingDetermines if the call should block to allow terrain to page in. If the simulation is running when createEntity is called this should be set to false.
initialAdminContentIf included, the adminContent messages are passed to the entity immediately upon creation, as if you had sent adminMessages on the creation instant.
Returns
If allowBlocking is true, a pointer to the newly created object is returned. Otherwise a null pointer is returned as the creation is queued until the terrain is paged in.
Note
Object names are sent in the marking text field. There are length limitations, depending on the type of object and the protocol (DIS/HLA) being used. All names 10 characters or shorter are always valid.
virtual DtLocalObject* DtCgf::createAggregate ( const DtEntityType &  aggregateType,
DtForceType  force,
const DtVector localPosition,
DtReal  heading,
const std::vector< DtUUID > &  subordinates = std::vector< DtUUID >(),
const DtString aggregateName = DtString::nullString(),
bool  addToOrbat = true 
) const
virtual

Create a new aggregate of the given force type and object type, at the given position and heading. Aggregate Returns a pointer to a newly created entity.

Parameters
aggregateTypeThe extended entity type (super type + DIS/RPR entity type). See EntityTypes.h for the standard enumerations and objTypeEnums.h for VR-Forces extended enumerations.
forceThe DIS/RPR enumeration for force types, extended to allow up to 255 different types. See disEnums.h for the standard enumerations.
localPositionis in the coordinate system of the loaded terrain database.
headingheading in radians, measured clockwise from North.
subordinatesis an optional list of subordinate uuids of entities and/or aggregates to be aggregated under this new aggregate. The list is an ordered vector of DtUUIDs, with the order of most significant subordinate (the 'leader') to the least. Only those subordinates that exist at the time of creation will be added to the aggregate (subordinates can always be added later by calling addSubordinate()).
aggregateNameThe object name of the entity. By default, it is set to a null string, indicating that VR-Forces should generate a new name for the entity.
Returns
the aggregate object
Note
Object names are sent in the marking text field. There are length limitations, depending on the type of object and the protocol (DIS/HLA) being used. All names 10 characters or shorter are always valid.
virtual DtLocalObject* DtCgf::createAggregate ( const DtEntityType &  aggregateType,
DtForceType  force,
const DtVector localPosition,
DtReal  heading,
bool  createSubordinates,
const DtString aggregateName = DtString::nullString(),
bool  allowBlocking = true,
bool  addToOrbat = true 
) const
virtual

Similar to previous function, but this version takes a bool createSubordinates argument instead of subordinateNames. If createSubordinates is true, will create any subordinates listed in its "subordinate-objects" parameter database entry. If false, it just creates the aggregate.

Parameters
allowBlockingDetermines if the call should block to allow terrain to page in. If the simulation is running when createEntity is called this should be set to false.
Returns
If allowBlocking is true, a pointer to the newly created object is returned. Otherwise a null pointer is returned as the creation is queued until the terrain is paged in.
virtual bool DtCgf::addSubordinate ( DtLocalObject subordinate,
DtLocalObject aggregate 
)
virtual

Add a subordinate to a given aggregate.

Returns
true if successful, false if not.
Parameters
subordinateis the the entity (may be platform or aggregate) to add to the aggregate (organize it under the aggregate). Note the must be detached from its previous aggregate (through a removeSubordinate(), before calling addSubordinate() to attach it to a new one. Failure to do so will result may result in undefined behavior.
aggregateis the the aggregate we want to add the subordinate to (e.g. "1 Plt, 1 Force").
virtual bool DtCgf::removeSubordinate ( DtLocalObject subordinate,
DtLocalObject aggregate 
)
virtual

Remove a subordinate from given aggregate.

Returns
True if successful, false if not. Always call removeSubordinate() to remove an entity from its current aggregate before organizing it under a new superior through an addSubordinate() call. Note that once removeSubordinate() has been successfully called, the entity being removed no longer has a valid object name, and cannot be looked up in the object manager by name (so hold on to the DtLocalObject* until you reorganize it under a new aggregate).
Parameters
subordinateis the the entity (may be platform or aggregate) to remove from the aggregate.
aggregateis the the aggregate the subordinate is to be removed from (e.g. "1 Plt, 1 Force").
virtual void DtCgf::assignTask ( const DtLocalObject entity,
const DtSimTask task 
)
virtual

Assigns a task to an entity. If the entity is currently executing a plan, the task will be a 'retask', that is, this task will replace whatever it was currently working on.

Parameters
entityis a platform or aggregate entity.
taskThe task to assign to the object.
virtual void DtCgf::sendSetDataRequest ( const DtLocalObject entity,
const DtSetDataRequest request 
)
virtual

Sends a set data request an entity. Set data requests are used to request immediate changes in an entity, e.g. set heading (entity instantly changes orientation), and set restore (entity is immediately restored to full resources and health).

Parameters
entityis a platform or aggregate entity.
requestThe DtSetDataRequest subclass to send to entity.
virtual void DtCgf::assignPlanByUUID ( const DtUUID ,
const DtPlan plan 
)
virtual

Assigns a plan to the named object.

virtual void DtCgf::abandonPlan ( const DtLocalObject entity)
virtual

Command the entity/aggregate corresponding to abandon its plan.

Parameters
entityis a platform or aggregate entity.
virtual void DtCgf::restartPlan ( const DtLocalObject entity)
virtual

Command the entity/aggregate corresponding to restart its plan.

Parameters
entityis a platform or aggregate entity.
virtual void DtCgf::logObjectConsoleToFile ( DtLocalObject object,
DtFilename  filename = DtFilename::nullFilename() 
)
virtual

Directs the output of the object console of the specified object to the specified file. If the filename is not specified, the log file will be named using the name of the object.

virtual void DtCgf::stopLoggingObjectConsoleToFile ( DtLocalObject object)
virtual

Stops logging the console output for the object to a file.

virtual void DtCgf::setObjectConsoleNotificationLevel ( DtLocalObject object,
DtNotifyLevelType  level 
)
virtual

Sets the notification level of a specific object console. This will affect what messages are sent the a log file, the GUI object console, and the sim engine console window.

virtual bool DtCgf::reuseEntityIdentifiersOnScenarioLoad ( ) const
virtual

Set to true in order to reuse object identifiers that might be part of the scenario. If the object identifier saved in the order of battle does not currently match the site/app of the back-end loading that object, then the user will be warned and the object will be assigned a new entity identifier that is compliant with that site/app. This will not apply to simulation object groups or scenario import. They will always get new entity identifiers.

virtual void DtCgf::setReuseEntityIdentifiersOnScenarioLoad ( bool  )
virtual

Set to true in order to reuse object identifiers that might be part of the scenario. If the object identifier saved in the order of battle does not currently match the site/app of the back-end loading that object, then the user will be warned and the object will be assigned a new entity identifier that is compliant with that site/app. This will not apply to simulation object groups or scenario import. They will always get new entity identifiers.

virtual void DtCgf::setTaskVisualizationPublicationMode ( DtTaskVisualizationPublicationMode  mode)
virtual

If and when task visualizations should be published to the network.

virtual DtTaskVisualizationPublicationMode DtCgf::taskVisualizationPublicationMode ( ) const
virtual

If and when task visualizations should be published to the network.

virtual void DtCgf::setUseDrawControlForTaskVisualizations ( bool  )
virtual

Publish task visualizations as VRV draw control objects rather than their standard, VR-Forces specific format.

virtual bool DtCgf::useDrawControlForTaskVisualizations ( ) const
virtual

Publish task visualizations as VRV draw control objects rather than their standard, VR-Forces specific format.

virtual DtSimManager* DtCgf::simManager ( ) const
virtual

Accessors.

DtSimManager maintains the simulation clock, the scheduler, and the message interface.

virtual DtSimulationServices* DtCgf::simulationServices ( ) const
virtual
virtual DtImportExportScenarioDescriptionManager* DtCgf::importExportScenarioDescriptionManager ( ) const
virtual

Import scenario description manager.

virtual DtResourceMonitor* DtCgf::resourceMonitor ( ) const
virtual

DtResourceMonitor maintains the requests for updating resources to the network or to the console.

virtual DtRadarCoverageMonitor* DtCgf::radarCoverageMonitor ( ) const
virtual

DtRadarCoverageMonitor maintains the requests for updating radar coverage display areas.

virtual DtTerrainProfileRequestManager* DtCgf::terrainProfileRequestManager ( ) const
virtual

DtTerrainProfileRequestManager maintains the requests for terrain profile lines.

virtual DtFactoryManager* DtCgf::factoryManager ( ) const
virtual

DtFactoryManager contains all of the class factories (e.g. component factory, state repository factory, etc.).

virtual DtSnapshotManager* DtCgf::snapshotManager ( ) const
virtual

Returns the snapshot manager.

virtual DtLocalObjectManager* DtCgf::localObjectManager ( ) const
virtual

DtLocalObjectManager is used to create local objects or add local components to an object via remote attachment. Do not use it to query objects, which is not thread safe. To query sim objects use the sim object manager.

virtual DtSimObjectManager* DtCgf::simObjectManager ( ) const
virtual

DtSimObjectManager maintains all of the simulated entities, aggregates, and control objects in the simulation, local and remote.

virtual DtDebugDrawManager* DtCgf::debugDrawManager ( ) const
virtual

DtDebugDrawManager can send draw request to the debugDrawRenderer.

virtual DtScriptedTaskManager* DtCgf::scriptedTaskManager ( ) const
virtual

DtScriptedTaskManager contains all the scripted tasks available.

virtual DtScenarioEventManager* DtCgf::scenarioEventManager ( ) const
virtual

DtScenarioEventManager contains all the scenario events.

virtual DtHazardAreaManager* DtCgf::hazardAreaManager ( ) const
virtual

DtHazardAreaManager contains all the hazard areas.

virtual DtIntelCollectionAreaManager* DtCgf::intelCollectionAreaManager ( ) const
virtual

DtIntelCollectionAreaManager contains all the intel collection areas.

virtual DtScriptedObjectsMovementManager* DtCgf::ScriptedObjectsMovementManager ( ) const
virtual

DtScriptedObjectsMovementManager contains all the scripted movement objects.

virtual DtDetonationManager* DtCgf::detonationManager ( ) const
virtual

The detonation manager processes all the detonation interactions in the simulation and notifies the appropriate entities of relevant detonations.

virtual DtAmmunitionManager* DtCgf::ammunitionManager ( ) const
virtual

The ammunition manager simply reads and has knowledge of ammunition types and the objects they can target.

virtual DtFireManager* DtCgf::fireManager ( ) const
virtual

The fire manager processes all the fire interactions in the simulation and notifies the appropriate entities of relevant for under-fire determination.

virtual DtScenarioExtrasMgr* DtCgf::scenarioExtrasMgr ( ) const
virtual

The Scenario Extras manager holds scenario data not tied to a particular entity: Force and hostility data Spawn templates.

virtual DtVrfParameterDb* DtCgf::parameterDatabase ( ) const
virtual

Parameter database used in creation and initialization of DtSimObjects.

virtual DtGlobalPlanManager* DtCgf::globalPlanManager ( )
virtual

DtGlobalPlanManager maintains the list of global (non-entity) plans.

virtual DtStealthCommandsManager* DtCgf::stealthCommandsManager ( )
virtual

DtStealthCommandsManager maintains the list of available stealth commands.

virtual DtTerrainInterface* DtCgf::terrainInterface ( )
virtual
Returns
Pointer to the currently loaded terrain interface, if it exists.
virtual const DtTerrainInterface* DtCgf::terrainInterface ( ) const
virtual
Returns
Pointer to the currently loaded terrain interface, if it exists.
virtual DtPhysicalWorld* DtCgf::physicalWorld ( )
virtual
Returns
A pointer to the physical world.
Note
This function should never return false.
virtual const DtPhysicalWorld* DtCgf::physicalWorld ( ) const
virtual
Returns
A pointer to the physical world.
Note
This function should never return false.
virtual void DtCgf::setPhysicalWorld ( DtPhysicalWorld newPhysicalWorld)
virtual

Sets the physical world.

virtual DtVrfNavAreaManager* DtCgf::vrfNavAreaManager ( )
virtual
virtual const DtVrfNavAreaManager* DtCgf::vrfNavAreaManager ( ) const
virtual
virtual void DtCgf::setVrfNavAreaManager ( DtVrfNavAreaManager newVrfNavAreaManager)
virtual
virtual DtSpawnSinkManager* DtCgf::spawnSinkManager ( )
virtual
virtual const DtSpawnSinkManager* DtCgf::spawnSinkManager ( ) const
virtual
virtual DtCommModelManager* DtCgf::commModelManager ( )
virtual
Returns
Pointer to the DtCommModelManager for the simulation.
virtual const DtCommModelManager* DtCgf::commModelManager ( ) const
virtual
Returns
Pointer to the DtCommModelManager for the simulation.
virtual const DtDiGuyCharacterDataManager* DtCgf::diGuyCharacterManager ( ) const
virtual
virtual DtSimTerrainRequestManager* DtCgf::simTerrainRequestManager ( )
virtual
Returns
Pointer to the DtSimTerrainRequestManager
virtual const DtSimTerrainRequestManager* DtCgf::simTerrainRequestManager ( ) const
virtual
Returns
Pointer to the DtSimTerrainRequestManager
virtual DtSimCommandDistributor* DtCgf::simCommandDistributor ( )
virtual

Manages callbacks for sim commands.

virtual DtScenario* DtCgf::scenario ( ) const
virtual

Current scenario. May be 0, if there is no scenario currently loaded.

virtual const DtSimulationAddress& DtCgf::simulationAddress ( ) const
virtual

site Id/application Id simulation address. Uniquely identifies our simulator in an exercise.

virtual int DtCgf::sessionId ( ) const
virtual

Session id, which is an integer identifier used to determine which back-ends have simulation access/control over one another. Only simulation back-ends with common session Ids can send/recieve radio messages, tasks, entity/object creation messages etc. (in addition to the normal DIS/RPR messages).

virtual DtU32 DtCgf::scenarioCapabilities ( ) const
virtual

Indicates the capabilities this VRF based application. This doesn't specifically limit the capabilities of this class, but publishes this capabilities as part of the status, changing the way a VRF GUI or remote control application interacts with this application.

See Also
DtScenarioCapabilities
virtual void DtCgf::setScenarioCapabilities ( DtU32  v)
virtual

Indicates the capabilities this VRF based application. This doesn't specifically limit the capabilities of this class, but publishes this capabilities as part of the status, changing the way a VRF GUI or remote control application interacts with this application.

See Also
DtScenarioCapabilities
virtual void DtCgf::setScenarioCapability ( DtU32  v,
bool   
)
virtual

Indicates the capabilities this VRF based application. This doesn't specifically limit the capabilities of this class, but publishes this capabilities as part of the status, changing the way a VRF GUI or remote control application interacts with this application.

See Also
DtScenarioCapabilities
virtual void DtCgf::setTimeMultiplier ( double  )
virtual

Sets the time multiplier for the scenario.

virtual DtString DtCgf::applicationType ( ) const
virtual

A human readable string indicating the type of this application which will be sent in the status message, such as "VR-Forces Sim Engine" or "VR-Engage Sim Engine".

virtual void DtCgf::setApplicationType ( const DtString type)
virtual

A human readable string indicating the type of this application which will be sent in the status message, such as "VR-Forces Sim Engine" or "VR-Engage Sim Engine".

virtual DtVrfStatusPublisher* DtCgf::statusPublisher ( ) const
virtual

Status publisher. Publishes our presence as a VR-Forces simulator on the network.

virtual void DtCgf::useMapDatum ( const DtMapDatum &  mapDatum)
virtual

Set the DtMapDatum to use for geocentric to geodetic conversion. For more information see "Choosing a Reference Ellipsoid" in the VR-Link Developer's Guide.

virtual void DtCgf::setParameterDbLoaded ( bool  flag)
virtual

Set to false to reload parameter database on next tick.

virtual void DtCgf::setDefaultParameterDbDirectory ( const DtFilename &  filename)
virtual

Set the default parameter database directory in which to look for the parameter database files specified in scenario files, after trying to look for the file relative to the application path. Initialized from the VRF_defaultParameterDatabasePath variable in vrfSim.mtl, by the DtVrfApp class.

virtual DtFilename DtCgf::objectGroupsRoot ( ) const
virtual

Model set that is considered the parent of those loaded.

virtual bool DtCgf::reinitializeScenario ( )
virtual

This call will reinitialize the scenario by deleting all local items and recreating them from the order of battle saved for the local items. This will use the checkpoint manager to checkpoint the scenario and recreate objects from that checkpoint. This will add a post tick callback to handle this in a post tick. This will also call the pre/post load scenario callbacks. To see if this is a scenario reinitialize check the isScenarioReinitializing() call to see if the flag is true.

virtual void DtCgf::setFullyLoadTerrain ( bool  yesOrNo)
virtual
virtual bool DtCgf::fullyLoadTerrain ( ) const
virtual
virtual void DtCgf::setAssertOnBlockingTerrainCalls ( bool  b)
virtual

If true, blocking terrain calls will cause an assert when a debug back-end is in run mode. When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

virtual bool DtCgf::assertOnBlockingTerrainCalls ( ) const
virtual

If true, blocking terrain calls will cause an assert when a debug back-end is in run mode. When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

virtual void DtCgf::setMetocEnable ( bool  b)
virtual

If true, will cause Environmental Process objects to also create METOC publisher When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

virtual bool DtCgf::metocEnable ( ) const
virtual

If true, will cause Environmental Process objects to also create METOC publisher When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

virtual void DtCgf::addPluginToLoad ( const DtString )
virtual

Plugin handling.

Adds a plugin to load durin the init process. Make sure to add plugins here if your plugin wants to create a higher level class (DtLocalObjectManager, DtVrfSimManager, etc)

virtual void DtCgf::setLoadPluginsIfVersionMismatch ( bool  )
virtual

Set to true if want to load plugins even if version mismatch. By default false. Passes to plugin manager.

virtual bool DtCgf::loadPluginsIfVersionMismatch ( ) const
virtual
virtual bool DtCgf::createAndInitPluginManager ( DtVrfCreator creator)
virtual

Creates and initializes the plugin manager (if not already created)

virtual void DtCgf::initializePluginCommandLineArguments ( DtApplicationSettings &  appInitializer)
virtual

Loads all the plugins scheduled for load and see if they have any command line arguments they want to add.

DtVrfCreator* DtCgf::vrfCreator ( )

Access the vrfCreator.

const DtVrfCreator* DtCgf::vrfCreator ( ) const

Access the vrfCreator.

virtual void DtCgf::addPreLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new terrain is loaded, with the filename of the terrain passed into the callback. The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::removePreLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new terrain is loaded, with the filename of the terrain passed into the callback. The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::addPostLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after a new terrain is loaded, with the filename of the terrain passed into the callback. The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::removePostLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after a new terrain is loaded, with the filename of the terrain passed into the callback. The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::runForDuration ( double  )
virtual

Starts a run duration. If there is an existing run duration cancels that duration and creates a new one. When the run duration is complete the timer is removed and the scenario is paused.

virtual void DtCgf::stopSimulationDurationTimer ( )
virtual

Stops the current duration run timer.

static void DtCgf::runDurationCompleteCallback ( void *  )
static

Callback for when duration run timer has completed.

virtual void DtCgf::processRunDurationComplete ( )
virtual
virtual void DtCgf::setPublishingGlobalEnvironment ( bool  )
virtual

Sets whether or not to publish global environment (if not already published) when loading scenario.

virtual void DtCgf::addPreLoadScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new scenario is loaded. This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::removePreLoadScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new scenario is loaded. This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::addPreScenarioReinitializeCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario objects are told to prepare for reinitialization.

virtual void DtCgf::removePreScenarioReinitializeCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario objects are told to prepare for reinitialization.

virtual void DtCgf::addPostScenarioReinitializeCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the scenario objects are told to prepare for reinitialization, but before the reinitialize has begun.

virtual void DtCgf::removePostScenarioReinitializeCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the scenario objects are told to prepare for reinitialization, but before the reinitialize has begun.

virtual void DtCgf::addPreCreateSimulationObjectGroupCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a simulation group is created.

virtual void DtCgf::removePreCreateSimulationObjectGroupCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a simulation group is created.

virtual void DtCgf::addPostLoadScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a scenario is loaded. This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::removePostLoadScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a scenario is loaded. This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::addPostCreateSimulationObjectGroupCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a simulation group is created.

virtual void DtCgf::removePostCreateSimulationObjectGroupCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a simulation group is created.

virtual void DtCgf::addPreImportScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new scenario is imported.

virtual void DtCgf::removePreImportScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new scenario is imported.

virtual void DtCgf::addPostImportScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a scenario is imported.

virtual void DtCgf::removePostImportScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a scenario is imported.

virtual void DtCgf::addPreSaveScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is saved. The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::removePreSaveScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is saved. The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::addPostSaveScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is saved. The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::removePostSaveScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is saved. The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::addPreCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is closed. The callback function signature is callback(void* usr)

virtual void DtCgf::removePreCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is closed. The callback function signature is callback(void* usr)

virtual void DtCgf::addPostCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is closed. The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePostCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is closed. The callback function signature is: void callback(void* usr)

virtual void DtCgf::addPreSaveSimulationObjectGroupsCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a simulation object group is saved.

virtual void DtCgf::removePreSaveSimulationObjectGroupsCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a simulation object group is saved.

virtual void DtCgf::addPostSaveSimulationObjectGroupsCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the simulation object group is saved.

virtual void DtCgf::removePostSaveSimulationObjectGroupsCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the simulation object group is saved.

virtual void DtCgf::addScenarioPauseCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the pause state. The callback function signature is: void callback(void* usr)

virtual void DtCgf::removeScenarioPauseCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the pause state. The callback function signature is: void callback(void* usr)

virtual void DtCgf::addScenarioRunCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the run state. The callback function signature is: void callback(void* usr)

virtual void DtCgf::removeScenarioRunCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the run state. The callback function signature is: void callback(void* usr)

virtual void DtCgf::addPreScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is rewound by calling the rewind() method. If the scenario is rolled back (as it does in 4.4.2 and beyond) you should add callbacks for preLoadScenario and postLoadScenario The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePreScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is rewound by calling the rewind() method. If the scenario is rolled back (as it does in 4.4.2 and beyond) you should add callbacks for preLoadScenario and postLoadScenario The callback function signature is: void callback(void* usr)

virtual void DtCgf::addPostScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the scenario is done rewinding. The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePostScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the scenario is done rewinding. The callback function signature is: void callback(void* usr)

virtual void DtCgf::addPostTickCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked at the end of the tick function. The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePostTickCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked at the end of the tick function. The callback function signature is: void callback(void* usr)

virtual void DtCgf::setTimeToQuit ( bool  )
virtual

If true, time for the app to quit.

virtual bool DtCgf::timeToQuit ( ) const
virtual

If true, time for the app to quit.

virtual void DtCgf::setFrameRateMode ( const DtString mode,
DtReal  deltaTime = -1 
)
virtual

Set the frame rate mode. May be one of the following modes (defined in msgTypes.h):

"variable-frame" "fixed-frame" "fixed-frame-run-to-complete"

If the frame mode is of type "fixed-frame" or "fixed-frame-run-to-complete", then the deltaTime parameter is the duration of a single frame in seconds. If deltaTime is -1 won't change current delta time

virtual bool DtCgf::executeSimCommand ( const DtSimCommand simCommand)
virtual

Executes the provided simulation command using the DtSimCommandExecutor from the factory.

Returns
True if the execution of the command succeeded.
virtual void DtCgf::unloadTerrain ( )
virtual

Unload the terrain from memory.

virtual bool DtCgf::isOrbatEnabled ( ) const
virtual

If enabled for sending orbat messages.

virtual double DtCgf::timeScale ( ) const
virtual
Returns
The current time scale of the simulation.
virtual void DtCgf::setRunInTimeManagementMode ( bool  )
virtual
virtual DtSyncMatrixManager* DtCgf::syncMatrixManager ( )
virtual

DtSyncMatrixManager maintains the list of synchronization matrices.

static void DtCgf::objectParametersOpCallback ( DtSimMessage msg,
void *  usr 
)
static

Callback for parameter database load/save messages. Expects messages of type DtObjectParametersOpMessageType. Calls processObjectParametersOp to handle the message.

static void DtCgf::scenarioDescriptionCallback ( DtSimMessage ,
void *  usr 
)
staticprotected

Callback for scenario description requests.

virtual void DtCgf::processScenarioDescription ( DtSimMessage )
protectedvirtual
static void DtCgf::setScenarioFilenameCallback ( DtSimMessage ,
void *  usr 
)
staticprotected

Callback for scenario description requests.

virtual void DtCgf::processSetScenarioFilename ( DtSimMessage )
protectedvirtual
static void DtCgf::setRunDurationCallback ( DtSimMessage ,
void *  usr 
)
staticprotected

Callback for setting the duration of the simulation run in absolute simulationtime.

virtual void DtCgf::processSetRunDuration ( DtSimMessage )
protectedvirtual
static void DtCgf::actionCategoriesRequestCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Callback for request for action categories.

virtual void DtCgf::processActionCategoriesRequest ( DtSimMessage msg)
protectedvirtual
static void DtCgf::scenarioStatusRequestCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Callback for scenario status message.

virtual void DtCgf::processScenarioStatusRequest ( DtSimMessage msg)
protectedvirtual
virtual bool DtCgf::beginFrame ( )
protectedvirtual

Returns true if not already in frame. If returns false do not call advance frame when wanting to advance the frame. It will get called, and, calling advance frame will cause an exception on the next advanceFrame call.

virtual bool DtCgf::advanceFrame ( )
protectedvirtual
DtCgf& DtCgf::operator= ( const DtCgf original)
private

not implemented. Copying this class is not supported.

virtual DtFilename DtCgf::spawnManagerTemplateFile ( const DtScenarioExplorer ) const
protectedvirtual

Given the scenario explorer return the first available template file from an SMS (or an included SMS) with the name defaultSpawnTemplates.mtl When loading a scenario only one template file is currently used, so, the first one in the SMS chain found will be used.

virtual void DtCgf::loadAllPlugins ( )
protectedvirtual

Called from init, will load all plugins scheduled to load by calling loadPlugin for each.

virtual bool DtCgf::loadComponentAttachmentTable ( const DtFilename &  filename)
protectedvirtual

Clears out the current component attachment table and loads the specified file.

virtual bool DtCgf::loadTerrain ( const DtFilename &  filename)
protectedvirtual

Load the given terrain database file filename, returning a pointer to the terrain data in terrain. Looks for the terrain in the following order:

  • Load the path given in filename
  • Path relative to VRF_TERRAIN_PATH environment variable
  • Path relative to default terrain dir (..).
virtual DtFilename DtCgf::findTerrainFile ( const DtFilename &  startFile,
const std::vector< DtFilename > &  searchPaths,
const std::string &  extension 
) const
protectedvirtual

Given the terrain filename, searchpaths, and extension to use (instead of the supplied extension) see if the terrain file can be found. If so, return the terrain filename, else return an empty string.

virtual bool DtCgf::loadOrderOfBattle ( const DtScenario scenario,
DtLoadScenarioData  
)
protectedvirtual

Load the given order of battle file.

virtual bool DtCgf::loadOrderOfBattle ( const DtInMemorySnapshot::OOB )
protectedvirtual
virtual bool DtCgf::writeOrderOfBattle ( const DtScenario scenario) const
protectedvirtual

Load the given order of battle file.

virtual bool DtCgf::writeOrderOfBattle ( DtInMemorySnapshot::OOB ) const
protectedvirtual
virtual bool DtCgf::loadScenarioScripts ( const DtFilename &  filename)
protectedvirtual

Load the given scenario scripts file.

virtual bool DtCgf::loadScenarioScriptsFromZipFile ( const DtFilename &  scenarioZipFile,
const DtFilename &  filename 
)
protectedvirtual
virtual bool DtCgf::loadScenarioScripts ( const std::string &  buffer)
protectedvirtual
virtual bool DtCgf::loadOrbat ( const DtFilename &  filename,
DtOrbatManager intoOm = 0,
bool  clearBeforeLoading = true 
)
protectedvirtual

Load the orbat from the data source.

virtual bool DtCgf::loadOrbatFromZipFile ( const DtFilename &  scenarioZipFile,
const DtFilename &  filename,
DtOrbatManager intoOm = 0,
bool  clearBeforeLoading = true 
)
protectedvirtual
virtual bool DtCgf::loadOrbat ( const std::string &  buffer,
DtOrbatManager intoOm = 0,
bool  clearBeforeLoading = true 
)
protectedvirtual
virtual void DtCgf::prepareForScenarioReinitialize ( )
protectedvirtual

Will take all locally simulated vrf objects and tell them to prepare for scenario reinitialization. This will invoke the pre/post scenario reinitialize callbacks before and after the objects have been prepared for reinitialization.

virtual bool DtCgf::isScenarioReinitializing ( ) const
protectedvirtual

Returns true if the scenario is reinitializing.

virtual bool DtCgf::loadParameterDb ( const DtFilename &  filename,
const DtReaderWriter::SearchPaths searchPaths,
bool  clearLoadedObjects = true,
bool  preloadParameters = false 
)
protectedvirtual

Clears out the current parameter database and loads the given parameter database file. searchPaths is the list of additional search paths from included SMSs.

virtual bool DtCgf::loadObjectParametersDBFile ( const DtFilename &  opdFile,
const DtReaderWriter::SearchPaths searchPaths,
bool  clearLoadedObjects = true,
bool  preloadParameters = false 
)
protectedvirtual

Load the given opd file; Returns true upon success, false otherwise. searchPaths is the list of additional search paths from included SMSs.

virtual bool DtCgf::loadPhysicalWorldFile ( const DtFilename &  file,
bool  force = false 
)
protectedvirtual

Loads the file into the physical world object (if it exists). Returns true if file is loaded. Note that if the file to be loaded has already been loaded, the file will not be reloaded unless the force flag is true.

virtual bool DtCgf::loadDetonationParametersFile ( const DtFilename &  file,
bool  force = false 
)
protectedvirtual

Loads the file into the detonation manager (if it exists). Returns true if file is loaded. Note that if the file to be loaded has already been loaded, the file will not be reloaded unless the force flag is true.

virtual bool DtCgf::loadTerrainDeformationParametersFile ( const DtFilename &  file,
bool  force = false 
)
protectedvirtual
virtual bool DtCgf::loadAmmunitionParametersFile ( const DtFilename &  file,
bool  force = false 
)
protectedvirtual

Loads the file into the ammunition manager (if it exists). Returns true if file is loaded. Note that if the file to be loaded has already been loaded, the file will not be reloaded unless the force flag is true.

virtual bool DtCgf::loadPlans ( const DtFilename &  filename)
protectedvirtual

Load the given plan file.

virtual bool DtCgf::loadPlansFromZipFile ( const DtFilename &  scenarioZipFile,
const DtFilename &  filename 
)
protectedvirtual
virtual bool DtCgf::loadPlans ( const std::string &  buffer)
protectedvirtual
virtual bool DtCgf::loadGlobalPlans ( const DtFilename &  filename)
protectedvirtual

Load the specified global plan file.

virtual bool DtCgf::loadGlobalPlansFromZipFile ( const DtFilename &  scenarioZipFile,
const DtFilename &  filename 
)
protectedvirtual
virtual void DtCgf::loadHostilityAndExtras ( const DtScenarioExplorer se)
protectedvirtual

A utility function that loads the following two sets of data.

virtual void DtCgf::loadHostilityAndExtrasFromZipFile ( const DtFilename &  scenarioZipFile,
const DtScenarioExplorer se 
)
protectedvirtual
virtual void DtCgf::loadHostilityAndExtras ( const std::string &  buffer)
protectedvirtual
virtual void DtCgf::loadActivities ( const DtScenarioExplorer )
protectedvirtual

Loads the activities that area available to this simulation modelset. Then sets these activities into the object manager for reference by controllers (if needed)

virtual void DtCgf::loadModelSetFiles ( const DtScenarioExplorer )
protectedvirtual

Loads the model set files for use with possible by name commands. Assigns model set to sim manager.

virtual void DtCgf::loadActionCategories ( const DtFilename &  f)
protectedvirtual

Loads the action categories that area available to resolve conflicting tasks. Always loaded from simulation model set task set rules directory, action_categories.tsk file.

virtual bool DtCgf::loadForceHostility ( const DtFilename &  filename,
bool  clear = true 
)
protectedvirtual
virtual bool DtCgf::loadForceHostilityFromZipFile ( const DtFilename &  scenarioZipFile,
const DtFilename &  filename,
bool  clear = true 
)
protectedvirtual
virtual bool DtCgf::loadScenarioExtras ( const DtFilename &  filename)
protectedvirtual
virtual bool DtCgf::loadScenarioExtrasFromZipFile ( const DtFilename &  ,
const DtFilename &  filename 
)
protectedvirtual
virtual bool DtCgf::loadScenarioExtras ( const std::string &  buffer)
protectedvirtual
virtual void DtCgf::processObjectParametersOp ( DtSimMessage msg)
protectedvirtual

Process load/save parameter database messages. Expects messages of type processObjectParametersOp.

virtual void DtCgf::createAndInitScenarioLoadManager ( )
protectedvirtual

Creates and initialized scenario load manager and default load handlers.

virtual void DtCgf::emptyParametersDB ( )
protectedvirtual

Empties contents of parameter database and clears myDefaultParameterDatabase.

virtual void DtCgf::setAutoReorganization ( bool  onOff)
protectedvirtual

Enable/disable auto-reorganization.

virtual DtVrfPlugin* DtCgf::loadPlugin ( const DtString )
protectedvirtual

Given the name of a plugin, load it from disk and initialize it with this cgf. Note that this can only be called during cgf initialization and should not be called after.

virtual bool DtCgf::setupCommModelsForScenario ( const DtScenarioExplorer e)
protectedvirtual

Given the names of the SMS and scenario comm model file names, sets up all comm models.

virtual void DtCgf::updateReadyStatus ( )
protectedvirtual

Updates the readiness status of the back end by: 1) Is there a scenario present (myScenario pointer is not 0) 2) Can the simulation be simulated (all pending operations are complete.

static void DtCgf::simCommandCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Callback for receiving sim commands coming over the network. Calls executeSimCommand().

virtual void DtCgf::processSimCommand ( DtSimMessage msg)
protectedvirtual

Callback for receiving sim commands coming over the network. Calls executeSimCommand().

static void DtCgf::deferredLoadScenarioCallback ( void *  data)
staticprotected

Callback that performs the second-half of the work needed to load a scenario. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

virtual void DtCgf::processDeferredLoadScenario ( )
protectedvirtual

Callback that performs the second-half of the work needed to load a scenario. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

virtual void DtCgf::processLoadScenario ( const DtScenario = 0,
const DtInMemorySnapshot = 0 
)
protectedvirtual

Shared routine for loading a scenario. Only one (from scenario or from in memory) should be specified. If both are specified the in memory Snapshot is used.

static void DtCgf::deferredReinitializeScenarioCallback ( void *  data)
staticprotected

Callback that performs the reinitializing of the scenario.

virtual void DtCgf::processDeferredReinitializeScenario ( )
protectedvirtual

Callback that performs the reinitializing of the scenario.

static void DtCgf::deferredRollbackCallback ( void *  data)
staticprotected

Callback that performs the second-half of the work needed to rollback to a Snapshot. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario. If you wish to be notified when a rollback occurs connect to the pre and post load scenario callbacks. Those are used in the process of rolling back a scenario.

virtual void DtCgf::processDeferredRollback ( )
protectedvirtual

Callback that performs the second-half of the work needed to rollback to a Snapshot. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario. If you wish to be notified when a rollback occurs connect to the pre and post load scenario callbacks. Those are used in the process of rolling back a scenario.

static void DtCgf::deferredImportScenarioCallback ( void *  data)
staticprotected

Callback that performs the second-half of the work needed to import a scenario. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

virtual void DtCgf::processDeferredImportScenario ( )
protectedvirtual

Callback that performs the second-half of the work needed to import a scenario. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

static void DtCgf::deferredRewindCallback ( void *  data)
staticprotected

Callback that performs the second-half of the work needed to rewind a scenario. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

virtual void DtCgf::processDeferredRewind ( )
protectedvirtual

Callback that performs the second-half of the work needed to rewind a scenario. Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

virtual void DtCgf::clearAllSimulationModelSetInformation ( )
protectedvirtual

When loading (or closing) a scenario this method will get rid of all SMS specific data. If there are snapshots available when closing a scenario keep this around (unless a load happens)

virtual void DtCgf::initializeCgfConsoleCommands ( )
protectedvirtual

Initializes console commands that only work using the cgf.

virtual void DtCgf::processCloseScenarioEvent ( const makVrfEvents::DtEvent )
protectedvirtual
virtual void DtCgf::processLoadScenarioEvent ( const makVrfEvents::DtEvent )
protectedvirtual
virtual bool DtCgf::createDIGuyCharacterManager ( const DtFilename &  diGuyAnimationsFile)
protectedvirtual

If Using DI-Guy Need to create the character manager.

void DtCgf::setVrfCreator ( DtVrfCreator creator)
protected

Sets the vrfCreator to use. If the cgf already owns a creator, then it is deleted before the new vrfCreator is set. Just setting the vrfCreator does not transfer ownership. A user allocated creator should be deleted by the user.

bool DtCgf::ownVrfCreator ( ) const
protected

Set/get whether or not the vrfCreator is owned by the Cgf or not.

void DtCgf::setOwnVrfCreator ( bool  yesOrNo)
protected

Set/get whether or not the vrfCreator is owned by the Cgf or not.

virtual bool DtCgf::differingModelSets ( DtScenario ) const
protectedvirtual

Return true if the supplied scenario uses different model sets than what is loaded.

virtual void DtCgf::simControlEvent ( const makVrfEvents::DtEvent )
protectedvirtual
virtual void DtCgf::clearObjectsAwaitingDiscovery ( )
protectedvirtual
virtual void DtCgf::processObjectsAwaitingDiscovery ( )
protectedvirtual
VRF4API_METHOD DtLocalObjectManager* DtCgf::vrfObjectManager ( )
inline

These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header file.

VRF4API_METHOD DtCommunicationManager* DtCgf::exerciseConn ( )
inline

These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header file.

Member Data Documentation

DtVrfSimOptionsInterface* DtCgf::mySimOptions
protected
DtSimulationAddress DtCgf::mySimulationAddress
protected

Address for routing interface messages.

DtU32 DtCgf::mySessionId
protected

Session Id.

bool DtCgf::myOK
protected

Flag indicating whether we have been successfully initialized.

bool DtCgf::myTimeToQuit
protected

Flag indicating whether or not the app should quit.

DtVrfPluginManager* DtCgf::myPluginManager
protected

The current plugin manager.

std::vector<DtString> DtCgf::myPluginsToLoad
protected
bool DtCgf::myLoadPluginsIfVersionMismatch
protected
DtTerrainInterface* DtCgf::myTerrainInterface
protected

The current terrain database.

DtPhysicalWorld* DtCgf::myPhysicalWorld
protected

The current physical world.

DtVrfNavAreaManager* DtCgf::myVrfNavAreaManager
protected
DtSpawnSinkManager* DtCgf::mySpawnSinkManager
protected
DtCommModelManager* DtCgf::myCommModelManager
protected
DtSimTerrainRequestManager* DtCgf::mySimTerrainRequestManager
protected
DtCommunicationManager* DtCgf::myCommunicationManager
protected

The current exercise connection.

DtSimManager* DtCgf::mySimManager
protected

Pointer to the DtSimManager.

DtCreateObjectServiceInterface* DtCgf::myCreateObjectService
protected

Pointer to the create object service.

DtScenarioServiceInterface* DtCgf::myScenarioService
protected

Pointer to the scenario object service.

DtScenario* DtCgf::myScenario
protected

The current scenario.

DtVrfStatusPublisher* DtCgf::myStatusPublisher
protected

Pointer to the DtStatusPublisher.

DtLocalObjectManager* DtCgf::myObjectManager
protected

Pointer to the DtLocalObjectManager.

DtDebugDrawManager* DtCgf::myDebugDrawManager
protected

Pointer to the DtDebugDrawManagert.

DtDetonationManager* DtCgf::myDetonationManager
protected
DtAmmunitionManager* DtCgf::myAmmunitionManager
protected
DtScriptedTaskManager* DtCgf::myScriptedTaskManager
protected
DtScenarioEventManager* DtCgf::myScenarioEventManager
protected
DtHazardAreaManager* DtCgf::myHazardAreaManager
protected
DtIntelCollectionAreaManager* DtCgf::myIntelCollectionAreaManager
protected
DtScriptedObjectsMovementManager* DtCgf::myScriptedObjectsMovementManager
protected
DtFireManager* DtCgf::myFireManager
protected
DtObjectConsoleManager* DtCgf::myObjectConsoleManager
protected
DtManagedObjectListManager* DtCgf::myFilteredObjectListManager
protected
DtOrbatManager* DtCgf::myOrbatManager
protected
DtObjectGeometricModelsManager* DtCgf::myObjectModelsManager
protected
DtVrfObjectPlanAdministrator* DtCgf::myPlanAdministrator
protected
DtSimInternalCommunicationManager* DtCgf::mySimInternalCommunicationManager
protected
DtDiGuyCharacterDataManager* DtCgf::myCharacterMgr
protected
bool DtCgf::myCreatedCharacterManager
protected
DtLuaObjectSerializer* DtCgf::myLuaObjectSerializer
protected
DtResourceMonitor* DtCgf::myResourceMonitor
protected

Pointer to the DtResourceMonitor.

DtRadarCoverageMonitor* DtCgf::myRadarCoverageMonitor
protected

Pointer to the DtRadarCoverageMonitor.

DtTerrainProfileRequestManager* DtCgf::myTerrainProfileRequestManager
protected
DtVrfParameterDb* DtCgf::myParameterDatabase
protected

Pointer to the DtVrfParameterDb.

DtEmbeddedEntityInfoManager* DtCgf::myEmbeddedEntityInfoManager
protected

Pointer to the DtEmbeddedEntityInfoManager.

bool DtCgf::myForceParameterDbReload
protected

Forces loadScenario to re-load the parameter database.

DtGlobalPlanManager* DtCgf::myGlobalPlanManager
protected
DtHostilityManager* DtCgf::myHostilityManager
protected
DtEngagementZonesManager* DtCgf::myEngagementZonesManager
protected
DtScenarioExtrasMgr* DtCgf::myScenarioExtrasManager
protected
DtFactoryManager* DtCgf::myFactoryManager
protected

Pointer to the DtFactoryManager.

DtStealthCommandsManager* DtCgf::myStealthCommandsManager
protected

Stealth commands manager.

DtSimCommandDistributor* DtCgf::mySimCommandDistributor
protected
DtFilename DtCgf::myVrfTerrainPathDirectory
protected

Terrain data directory from environment variable VRF_TERRAIN_PATH. If specified, this is the 3rd place to look for a terrain database file, after trying to locate it in its given path, and then relative to the path in the VRF_defaultTerrainDatabasePath vrfSim.mtl variable.

DtFilename DtCgf::myDefaultTerrainDirectory
protected

Terrain database directory, initialized from VRF_defaultTerrainDatabasePath variable. This is the second place to look for a terrain database specified in a scenario file, if we can't locate it relative to the application path.

DtFilename DtCgf::myDefaultSimulationModelSetFilename
protected

Default simulation model set file to load.

DtFilename DtCgf::myDIGuyAnimationsFilename
protected

DI_Guy animation configuration file to load.

DtFilename DtCgf::myMsdlSidcMappingFile
protected

MSDL SDIC mapping file to load.

DtFilename DtCgf::myCountryCodesMappingFile
protected

Country codes mapping file.

bool DtCgf::myParameterDbLoaded
protected

Set to true if parameter database has been loaded via loadParameterDatabase call. If you load a parameter database by another call, set this flag to true.

DtFilename DtCgf::myCurrentParameterDatabaseFilename
protected

Filename of currently loaded parameter database.

DtFilename DtCgf::myDefaultParameterDbDirectory
protected

Default parameter database directory to search in when parameter database being specified is not an absolute path. By default, the directory is "../data/parameters".

DtCallbackList<const DtFilename&> DtCgf::myPreLoadTerrainCallbacks
protected
DtCallbackList<const DtFilename&> DtCgf::myPostLoadTerrainCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreLoadScenarioCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostLoadScenarioCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreScenarioReinitializeCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostScenarioReinitializeCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreCreateSimulationObjectGroupCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostCreateSimulationObjectGroupCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreImportScenarioCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostImportScenarioCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreSaveScenarioCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostSaveScenarioCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreSaveSimulationObjectGroupsCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostSaveSimulationObjectGroupsCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPreCloseScenarioCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPostCloseScenarioCallbacks
protected
DtNoArgumentCallbackList DtCgf::myScenarioRunCallbacks
protected
DtNoArgumentCallbackList DtCgf::myScenarioPauseCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPreScenarioRewindCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPostScenarioRewindCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPostTickCallbacks
protected
DtSyncMatrixManager* DtCgf::mySyncMatrixManager
protected
bool DtCgf::myOwnVrfCreatorFlag
protected

These are essentially cached from the init call. This is necessary as the load terrain.

DtVrfCreator* DtCgf::myVrfCreator
protected
bool DtCgf::myFullyLoadTerrain
protected

Flag indicating whether to fully load terrain subpages for paged terrain.

bool DtCgf::myAssertOnBlockingTerrainCalls
protected

If true, blocking terrain calls will cause an assert when a debug back-end is in run mode. When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

DtSimulationModelSet* DtCgf::myDefaultModelSet
protected

Default simulation model set. This is created when the default simulation model set filename is set or on init() if one does not exist.

DtScenario DtCgf::myScenarioToLoad
protected

Used to contain the scenario we want to during loadScenario operation. The act of loading a scenario starts out in the loadScenario call, but much of the work occurs in deferredScenarioLoad (executed in a post-tick callback). Both functions need access to this data.

bool DtCgf::myCreateGlobalEnvironment
protected
bool DtCgf::myCreateGlobalDynamicTerrain
protected
bool DtCgf::myCreatedGlobalEnvironment
protected
bool DtCgf::myCreatedGlobalDynamicTerrain
protected
bool DtCgf::myWasPaused
protected

Used to hold the paused state during a rewindScenario operation. The act of rewinding a scenario starts out in the loadScenario call, but much of the work occurs in deferredScenarioLoad (executed in a post-tick callback). Both functions need access to this data.

DtImportExportScenarioDescriptionManager* DtCgf::myImportScenarioDescriptionManager
protected

The scenario description manager used to import scenario description files.

DtConsoleCommandOwner* DtCgf::myConsoleCommands
protected
ActionCategories DtCgf::myActionCategories
protected
DtIfScenarioStatus* DtCgf::myScenarioStatus
protected

Scenario status message to be sent out upon request.

bool DtCgf::myPublishingGlobalEnvironment
protected
bool DtCgf::myAboutToLoadOrRewindScenario
protected
bool DtCgf::myReinitializingScenario
protected
bool DtCgf::myMetocEnabled
protected
DtTaskVisualizationPublicationMode DtCgf::myTaskVisualizationPublicationMode
protected
bool DtCgf::myUseDrawControlForTaskVisualizations
protected
bool DtCgf::myReuseEntityIdentifiersOnScenarioLoad
protected
DtRwActivities DtCgf::myActivities
protected
bool DtCgf::mySmsValidationEnabled
protected
DtSnapshotManager* DtCgf::mySnapshotManager
protected
DtSimObjectManager* DtCgf::mySimObjectManager
protected
std::vector<DtFilename> DtCgf::myObjectGroupsRoot
protected
StoredSimulationObjectGroupInformation DtCgf::myStoredSimulationObjectGroupInformation
protected
int DtCgf::myRollbackToId
protected
bool DtCgf::myCanSimulate
protected
bool DtCgf::myIsLoaded
protected
bool DtCgf::myHasModelSetInformationLoadedAfterClose
protected
int DtCgf::myReloadDelay
protected
bool DtCgf::myRejectMismatchedScenarioMessages
protected
DtU32 DtCgf::myScenarioCapabilities
protected
int DtCgf::myAppIdRangeMax
protected
std::set<DtFilename> DtCgf::myLoadedModelSets
protected
DtInMemorySnapshot* DtCgf::myQueuedRollback
protected
int DtCgf::myQueuedRollbackScenarioRunId
protected
DtScenarioLoadManager* DtCgf::myScenarioLoadManager
protected
SimulationObjectGroupsToBeCreated DtCgf::mySimulationObjectGroupsToBeCreated
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)