![]() |
VR-Forces 4.2 Class Documentation
|
A simulation model set contains all the information that can be used to support a scenario either for simulation or visualization. More...

Public Member Functions | |
| DtSimulationModelSet () | |
| default constructor | |
| DtSimulationModelSet (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| virtual | ~DtSimulationModelSet () |
| destructor | |
| DtSimulationModelSet (const DtSimulationModelSet &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| DtSimulationModelSet & | operator= (const DtSimulationModelSet &orig) |
| assignment operator | |
| virtual bool | load (const DtFilename &) |
| Loads simulation model set from specified filename. | |
| virtual bool | save (const DtFilename &, bool rebind=true) |
| Saves simulation model set to specified filename. | |
| const DtFilename & | path () const |
| The path that is used as the relative (or absolute) path to load all internal files from. | |
| const DtFilename & | filename () const |
| Filename that this simulation model set was originally loaded from. | |
| DtSimulationModelSet * | clone () const |
| virtual DtFilename | modelSetDirectory () const |
| Returns the value of the model-set-directory variable, if it is defined for this model set, else returns an empty string. | |
| virtual bool | setModelSetDirectory (const DtFilename &) |
| Sets the model set directory if variable exists. If it does not, returns false. | |
| const DtRwVariableBindings * | originalVariableBindings () const |
| Returns the original variable bindings before substitutions. | |
| DtRwVariableBindings * | originalVariableBindings () |
| virtual void | saveVariableBindingsToOpdFile () |
| Saves the current variable bindings to the .opd file. | |
| const DtFilename & | hostilityFile () const |
| void | setHostilityFile (const DtFilename &s) |
| const DtFilename & | opdFile () const |
| Get/set object parameter database file. | |
| void | setOpdFile (const DtFilename &) |
| Get/set object parameter database file. | |
| const DtFilename & | physicalWorldFile () const |
| Get/set physical world file. | |
| void | setPhysicalWorldFile (const DtFilename &) |
| Get/set physical world file. | |
| const DtFilename & | indirectArtilleryTypesFile () const |
| Get/set indirect artillery types file. | |
| void | setIndirectArtilleryTypesFile (const DtFilename &) |
| Get/set indirect artillery types file. | |
| const DtFilename & | commModelParameters () const |
| Get/set communications model file. | |
| void | setCommModelParameters (const DtFilename &) |
| Get/set communications model file. | |
| const DtString & | comment () const |
| Get/set comment that will be written to top of file when saving out. | |
| void | setComment (const DtString &) |
| Get/set comment that will be written to top of file when saving out. | |
| virtual DtFilename | defaultComponentAttachmentFile () const |
| Returns the first component attachment filename in the list. | |
| DtComponentAttachmentList & | componentAttachmentFileList () |
| Returns the list of component attachment lookup files. | |
| const DtComponentAttachmentList & | componentAttachmentFileList () const |
| Returns the list of component attachment lookup files. | |
| DtFilename | getDataDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getGuiDirectory (bool warnOnFailure=true) const |
| Returns the directory that the gui files are in. | |
| DtFilename | getRecycleBin (bool warnOnFailure=true) const |
| Returns the recycle bin. | |
| DtFilename | getRootDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getScriptedMovementDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getUIDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getSystemDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getParametersDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getAmmoSelectDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getHitDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getDamageDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getDetectionDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| DtFilename | getFormationDirectory (bool warnOnFailure=true) const |
| Returns the directory that the data files are in. | |
| const DtFilename & | scenarioDataFile () const |
| Returns the scenario data file containing spawn templates, force hostility relationships,. | |
| void | setScenarioDataFile (const DtFilename &n) |
| Returns the scenario data file containing spawn templates, force hostility relationships,. | |
Public Member Functions inherited from DtReaderWriter | |
| DtReaderWriter () | |
| default constructor | |
| DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| real constructor Setting the readonly flag prevents object from writing itself to the stream. | |
| DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| const DtReaderWriter & | operator= (const DtReaderWriter &orig) |
| assignment operator | |
| bool | operator== (const DtReaderWriter &) const |
| Equivalence operator. | |
| bool | operator!= (const DtReaderWriter &rhs) |
| virtual | ~DtReaderWriter () |
| destructor | |
| virtual void | putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| Top level call to write itself to file. | |
| virtual void | getSelf (DtlObjPtr args, const DtFilename &searchPath=DtFilename::nullFilename(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| Top level to read itself from an input stream. | |
| virtual void | writeSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry. | |
| virtual DtSymbolString | name () const |
| Accessor for name of this readable/writable object. | |
| virtual void | addAlias (const DtSymbolString &alias) |
| Add an alias as an alternative name for this object. | |
| virtual bool | hasAlias (const DtSymbolString &alias) |
| virtual const aliasContainer & | aliases () const |
| virtual void | setReadonly (bool flag) |
| Set read-only flag. | |
| virtual bool | isReadonly () const |
| virtual bool | variableIsBound () const |
| virtual void | unbindVariable () |
| Sets the myVariableIsBound flag to false. | |
| virtual void | setName (const DtString &) |
| Set the name of the object. | |
| virtual const char * | readerWriterType () const |
| Used to supply a string type that this reader writer type is. | |
| virtual DtString | prettyPrint () const |
| Routine to return a human readable form of the reader/writer variable. | |
| virtual void | bindVariables (DtVariableBindingsList variableBindings) |
| Runs a variable binding pass on this reader writer and any of its children. | |
| virtual std::list < DtVariableNameType > | unboundVariables () const |
| bool | invalid () const |
| virtual bool | hasChild (const DtReaderWriter *p) const |
| Returns true if this variable has a child p in it's chain. | |
| virtual void | setValueSpecified (bool specified, bool recurse=false) |
| The specified flags are used for optional values. | |
| virtual bool | valueSpecified () const |
| The specified flags are used for optional values. | |
| virtual bool | isVariableReference () const |
| Specifies whether or not this reader writer is really a variable that is specified elsewhere. | |
| virtual void | setIsVariableReference (bool value) |
| virtual void | clearAllVariableReferenceFlags () |
| Clears out all variable reference flags from all readerwriter items in registry recursively. | |
| virtual DtSymbolString | variableName () const |
| The variable name, if this object is a variable reference. | |
| virtual void | setVariableName (const DtSymbolString variableName) |
| The variable name, if this object is a variable reference. | |
| const DtReaderWriterRegistry & | registry () const |
| Collection of child DtReaderWriter nodes owned by this object. | |
| DtReaderWriterRegistry & | registry () |
| Collection of child DtReaderWriter nodes owned by this object. | |
Protected Member Functions | |
| virtual DtString | createSubstitutedPath (const DtFilename &, const DtString &modelSetDir) |
| Creates a path (with filename) that will try and use the model-set-directory. | |
| virtual void | setupVariableSubstitutedPaths () |
| virtual void | substituteVariablePaths () |
| virtual void | resetVariables () |
| virtual void | placeOpdVariablesIntoVariableBindings () |
| Places the opd variables into the variable bindings for this class. | |
| virtual DtReaderWriter * | readOpdFile () const |
| Returns a reader/writer which represents the contents of the .opd file, which will just be variable parameters. | |
| virtual void | substituteInVariables (const DtString &variable) |
| Substitutes variables in variables. | |
Protected Member Functions inherited from DtReaderWriter | |
| virtual void | bindToRwAsVariable (const DtReaderWriter *rw) |
| Copies values from the specified DtReaderWriter. | |
| virtual void | bindLocalVariables (const DtVariableBindingsList &variableBindings) |
| Checks to see if this RW object is a variable reference that can be bound using the provided bindings. | |
| virtual void | putData (FILE *fp, int indentLevel=0) |
| Deriving class overrides these to get/put class specific data. | |
| virtual DtlObjPtr | getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| Deriving class overrides these to get/put class specific data. | |
Protected Attributes | |
| DtRwString | myOpdFile |
| DtRwString | myPhysicalWorldFile |
| DtRwString | myIndirectArtilleryTypesFile |
| DtRwString | myCommModelParameters |
| DtRwString | myHostilityFile |
| DtRwString | myScenarioDataFile |
| DtFilename | myPath |
| DtFilename | myFilename |
| DtString | myComment |
| DtFilename | mySubOpdFile |
| Substituted copies of name. | |
| DtFilename | mySubPhysicalWorldFile |
| DtFilename | mySubIndirectArtilleryTypesFile |
| DtFilename | mySubCommModelParameters |
| DtFilename | mySubHostilityFile |
| DtFilename | mySubScenarioDataFile |
| DtComponentAttachmentList | myComponentAttachmentFileList |
| DtRwVariableBindings * | myOriginalVariableBindings |
Protected Attributes inherited from DtReaderWriter | |
| const DtSymbolString | myName |
| DtReaderWriterRegistry | myRegistry |
| bool | myValueSpecified |
| bool | myReadOnlyFlag |
| bool | myIsVariableReference |
| DtSymbolString | myVariableName |
| bool | myVariableIsBound |
| aliasContainer | myAliases |
| Container for the aliases which represent alternative names for the object. | |
| bool | myInvalid |
| Set to true if there is a problem reading this item. | |
Additional Inherited Members | |
Public Types inherited from DtReaderWriter | |
| typedef std::vector < DtSymbolString > | aliasContainer |
| typedef std::vector < DtSymbolString >::iterator | aliasIter |
| typedef std::vector < DtSymbolString > ::const_iterator | aliasConstIter |
| typedef std::pair < DtSymbolString, DtString > | DtVariableNameType |
| typedef DtReaderWriterFactory *(* | DtReaderWriterFactoryCreatorFcn )() |
Static Public Member Functions inherited from DtReaderWriter | |
| static void | putIndent (FILE *fp, int indentLevel) |
| static const DtVariableBindingsList & | nullVariableReference () |
| static void | setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData) |
| static void | setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData) |
| static const DtFilename & | appPath () |
| Gets the current working directory. | |
| static void | setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn) |
| Sets the function to create the DtReaderWriterFactory. | |
| static void | createReaderWriterFactory () |
| static DtReaderWriterFactory * | factory () |
Static Protected Attributes inherited from DtReaderWriter | |
| static DtString | theUnspecifiedValue |
| static DtGetSelfCallbackInfo | thePostGetSelfCallback |
| static DtPutSelfCallbackInfo | thePrePutSelfCallback |
| static const DtVariableBindingsList | theEmptyVariableBindingsList |
| static bool | theCreatorFcnSet |
| static DtReaderWriterFactory * | theFactory |
| static DtReaderWriterFactoryCreatorFcn | theFactoryCreatorFcn |
A simulation model set contains all the information that can be used to support a scenario either for simulation or visualization.
All files in this model set are defined to be relative to this file from where it was loaded. To get the complete path to a file, referece it as:
DtFilename::combine(simulationModelSet.path(), <file>) e.g: DtFilename::combine(simulationModelSet.path(), simulationModelSet.physicalWorldFile());
| DtSimulationModelSet::DtSimulationModelSet | ( | ) |
default constructor
| DtSimulationModelSet::DtSimulationModelSet | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
|
virtual |
destructor
| DtSimulationModelSet::DtSimulationModelSet | ( | const DtSimulationModelSet & | orig, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
copy constructor
| DtSimulationModelSet& DtSimulationModelSet::operator= | ( | const DtSimulationModelSet & | orig | ) |
assignment operator
|
virtual |
Loads simulation model set from specified filename.
Saves simulation model set to specified filename.
Part of the save process will be to try and make directories that might be part of simulation model set items relative to the file and subsitute the model-set-directory variable (if specified)
If rebind is false, takes originally read in names and saves them out, versus substituting variable name in for newly set files
|
inline |
The path that is used as the relative (or absolute) path to load all internal files from.
References myPath.
|
inline |
Get/set object parameter database file.
References mySubOpdFile.
|
inline |
Get/set object parameter database file.
References mySubOpdFile.
|
inline |
Get/set physical world file.
References mySubPhysicalWorldFile.
|
inline |
Get/set physical world file.
References mySubPhysicalWorldFile.
|
inline |
Get/set indirect artillery types file.
References mySubIndirectArtilleryTypesFile.
|
inline |
Get/set indirect artillery types file.
References mySubIndirectArtilleryTypesFile.
|
inline |
Get/set communications model file.
References mySubCommModelParameters.
|
inline |
Get/set communications model file.
References mySubCommModelParameters.
|
inline |
Get/set comment that will be written to top of file when saving out.
References myComment.
|
inline |
Get/set comment that will be written to top of file when saving out.
References myComment.
|
virtual |
Returns the first component attachment filename in the list.
|
inline |
Filename that this simulation model set was originally loaded from.
References myFilename.
Referenced by DtSimulationModelSetLoader::simulationModelSetFilename().
| DtSimulationModelSet* DtSimulationModelSet::clone | ( | ) | const |
|
virtual |
Returns the value of the model-set-directory variable, if it is defined for this model set, else returns an empty string.
|
virtual |
Sets the model set directory if variable exists. If it does not, returns false.
|
inline |
Returns the list of component attachment lookup files.
References myComponentAttachmentFileList.
|
inline |
Returns the list of component attachment lookup files.
References myComponentAttachmentFileList.
| DtFilename DtSimulationModelSet::getDataDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getGuiDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the gui files are in.
| DtFilename DtSimulationModelSet::getRecycleBin | ( | bool | warnOnFailure = true | ) | const |
Returns the recycle bin.
| DtFilename DtSimulationModelSet::getRootDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getScriptedMovementDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getUIDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getSystemDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getParametersDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getAmmoSelectDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getHitDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getDamageDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getDetectionDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
| DtFilename DtSimulationModelSet::getFormationDirectory | ( | bool | warnOnFailure = true | ) | const |
Returns the directory that the data files are in.
Routines that return directories that are referenced by the model set
|
inline |
Returns the original variable bindings before substitutions.
|
inline |
|
virtual |
Saves the current variable bindings to the .opd file.
|
inline |
References mySubHostilityFile.
|
inline |
References mySubHostilityFile.
|
inline |
Returns the scenario data file containing spawn templates, force hostility relationships,.
References mySubScenarioDataFile.
|
inline |
Returns the scenario data file containing spawn templates, force hostility relationships,.
References mySubScenarioDataFile.
|
protectedvirtual |
Creates a path (with filename) that will try and use the model-set-directory.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Places the opd variables into the variable bindings for this class.
|
protectedvirtual |
Returns a reader/writer which represents the contents of the .opd file, which will just be variable parameters.
|
protectedvirtual |
Substitutes variables in variables.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by path().
|
protected |
Referenced by filename().
|
protected |
Referenced by comment(), and setComment().
|
protected |
Substituted copies of name.
Referenced by opdFile(), and setOpdFile().
|
protected |
Referenced by physicalWorldFile(), and setPhysicalWorldFile().
|
protected |
Referenced by indirectArtilleryTypesFile(), and setIndirectArtilleryTypesFile().
|
protected |
Referenced by commModelParameters(), and setCommModelParameters().
|
protected |
Referenced by hostilityFile(), and setHostilityFile().
|
protected |
Referenced by scenarioDataFile(), and setScenarioDataFile().
|
protected |
Referenced by componentAttachmentFileList().
|
protected |