![]() |
VR-Forces 4.2 Class Documentation
|

Classes | |
| class | EntityData |
| class | EnvironmentContainer |
Public Types | |
| enum | LoadFlags { LoadDataFiles = 0x00000001, LoadParameterFiles = 0x00000002, LoadSystemFiles = 0x00000004, LoadSupportingFiles = 0x00000008, LoadAll = LoadDataFiles | LoadParameterFiles | LoadSystemFiles | LoadSupportingFiles } |
| typedef std::map< DtString, DtVrfObjectParameters * > | ParametersMap |
| typedef boost::shared_ptr < EnvironmentContainer > | EnvironmentContainerSP |
Public Member Functions | |
| DtSimulationModelSetLoader (makVrv::DtDe &) | |
| default constructor | |
| virtual | ~DtSimulationModelSetLoader () |
| virtual bool | load (const DtSimulationModelSet &, LoadFlags flags=LoadAll) |
| virtual bool | save (const DtFilename &) |
| virtual void | setDisplayDe (makVrv::DtDe *) |
| virtual makVrv::DtDe & | displayDe () |
| virtual bool | hasFileNamed (const std::string &s) const |
| Returns true if there is a file named with the supplied file. Strips paths and such. | |
| virtual bool | addNewDataFile (const std::string &) |
| Copies the data file from the specified location into the simulation model set data directory and loads it into the gui. | |
| virtual std::string | platform (const makVrf::DtEntityMapperKey &k) const |
| Returns the platform of the particular item. | |
| virtual std::string | platformFileType (const makVrf::DtEntityMapperKey &k) const |
| Returns the platform file. | |
| DtFilename | getSystemDirectory () const |
| DtFilename | getFormationDirectory () const |
| DtFilename | path () const |
| DtFilename | simulationModelSetFilename () const |
| Returns the filename of the current simulation model set file. | |
| virtual bool | openSystemFiles (const DtFilename &directory) |
| virtual bool | loadForceHostilityFile (const DtFilename &f) |
| virtual bool | loadDataFiles (const DtString &) |
| Loads all the data files in the data directory of the simulation model set. | |
| virtual bool | loadParameterFiles (const DtString &) |
| Loads all the parameter files in the parameter directory of the simulation model set. | |
| virtual bool | loadModelSet () |
| Creates the model set list from the loaded data files. | |
| virtual DtModelSetEntry * | modelEntry (const DtObjectType &, bool matchPattern=false) const |
| If there is no model entry, will create one with the object type, using the object types string as a label. | |
| virtual DtModelSetEntry | createModelSetEntryFrom (DtEnvironmentSP env, DtEnvValueSP objectNode) const |
| Returns a model set entry based on the environment that contains a guiInformation entry. | |
| virtual DtModelSetEntry | createModelSetEntryFrom (const DtObjectType &) const |
| virtual void | revertData (const makVrf::DtEntityMapperKey &key) |
| Reverts the data to previous settings. | |
| virtual EntityData * | dataFor (const DtObjectType &) const |
| Returns the variable bindings for the given object type. | |
| virtual bool | containsObjectType (const DtObjectType &) const |
| Returns true if an original (unmodified) model contains the object type or if a modified version does. | |
| virtual bool | hasModelNamed (const DtString &) |
| Returns true if an original (unmodified) model contains the object name or if a modified version does. | |
| virtual const ParametersMap & | availableParameters () const |
| virtual bool | createRwVariable (const DtObjectType &, const std::string &rwType, const std::string &rwName, DtReaderWriter *&source, DtReaderWriter *&backup) |
| Given an object type crete source an backup variables of the given RW type (if it exists). | |
| virtual void | replaceSystem (const DtFilename &) |
| virtual bool | isModified (const DtObjectType &) const |
| virtual bool | isModified (EntityData *) const |
| virtual bool | isModified () const |
| virtual bool | isNew (const DtObjectType &) const |
| virtual bool | isNew (EntityData *) const |
| virtual bool | isDeleted (const DtObjectType &) const |
| virtual bool | isDeleted (EntityData *) const |
| virtual void | deleteModel (DtModelSetEntry *) |
| Schedules the model for "deletion". | |
| virtual void | deleteModel (const DtObjectType &) |
| virtual void | deleteModel (EntityData *) |
| virtual bool | changeObjectType (const DtObjectType &oldType, const DtObjectType &newType) |
| Changes object type on model and data. Returns true if successful. | |
| virtual bool | changeMatchType (const DtObjectType &oldType, const DtObjectType &newType) |
| Changes match type on data. Returns true if successful. | |
| virtual void | updateGuiInformation (EntityData *) |
| Updates the model set entry information into the modified model data's gui information section. | |
| virtual void | updateSystemData (EntityData *) |
| Updates data about systems (adds, removes or modifies) | |
| virtual void | sharedSystems (const DtFilename &systemFile, std::vector< DtModelSetEntry * > &result) const |
| Returns all the model set entries that share the given system. | |
| virtual void | loadSystemFile (const DtFilename &) |
| Loads the specified system file into the system database. | |
| virtual void | updateDataInformation (EntityData *) |
| Updates all the data from the bindings into the modified data. | |
| virtual void | convertRegistryToEnvironment (const DtReaderWriterRegistry &data, DtEnvironmentSP env, DtEnvValueSP objectNode) const |
| Converts the registry data to the XML environment format. | |
| virtual void | removeSystem (DtEnvironmentSP env, const DtString &system, DtEnvValueSP objectNode) |
| Removes the system of the given name from the supplied environment. | |
| virtual void | addSystem (DtEnvironmentSP env, const DtRwVariableBindings *, DtEnvValueSP objectNode) |
| Adds the given system to the environment. | |
| virtual void | changeDefaultCategory (const QString &old, const QString &newCat) |
| virtual void | addDefaultCategories (QComboBox *) |
| void | setDefaultCategories (const QStringList &) |
| void | addDefaultCategory (const QString &) |
| const QStringList & | defaultCategories () const |
| virtual void | revertCategories () |
| virtual bool | hasModifiedCategories () const |
| virtual void | changeDefaultDeployedCountry (const QString &old, const QString &newCat) |
| virtual void | addDefaultDeployedCountries (QComboBox *) |
| void | setDefaultDeployedCountries (const QStringList &) |
| void | addDefaultDeployedCountry (const QString &) |
| const QStringList & | defaultDeployedCountries () const |
| virtual void | revertDeployedCountries () |
| virtual bool | hasModifiedDeployedCountries () const |
| virtual DtRwVariableBindings * | createVariableBindingsForSystem (const DtFilename &, const DtString &newSystemName) |
| Returns new variable bindings for the specified system. | |
| virtual DtModelSetEntry * | addNewEntity (const DtObjectType &base, const DtObjectType &newType, const DtString &name, const DtRwNLengthStringVector &categories, const DtString &uniqueID) |
| Adds a new entity of the given type based on the supplied type. | |
| virtual DtModelSetEntry * | addNewEntity (const std::string &platformType, const DtObjectType &newType, const DtString &name, const DtRwNLengthStringVector &categories, const DtString &uniqueID) |
| Adds a new entity of the given the supplied platform type. | |
| DtModelSetEntry * | addNewEntity (EntityData *baseData, const DtObjectType &newType, const DtString &name, const DtRwNLengthStringVector &categories, const DtString &uniqueID) |
| Adds a new entity given the base data. Will clone the data and add new based on it. | |
| virtual void | removeSystem (const DtFilename &) |
| Removes the current system from the system database. | |
| virtual const DtRwVariableBindings * | variableBindings () const |
| virtual QPixmap | getIcon (const makVrf::DtEntityMapperKey &key, int pointSize=48, bool sizeToFont=false) |
| virtual void | clearIcons (const makVrf::DtEntityMapperKey &key) |
| virtual void | changeSubordinateTypes (const DtObjectType &oldType, const DtObjectType &newType) |
| Scans all subordinate lists for the old type and changes it to the new type. | |
| virtual DtVrfSubObjectParameterList | subordinateObjectsFor (const DtObjectType &) const |
| Returns a list of subordinate objects associated with the given entity type modified environment. | |
| virtual DtVrfSubObjectParameterList | subordinateObjectsFor (DtEnvironmentSP, DtEnvValueSP objectNode) const |
| virtual void | updateSubordinateObjects (const DtObjectType &, const DtVrfSubObjectParameterList &) |
| Updates the subordinate objects into the given object's modified environment. | |
| virtual void | updateSubordinateObjects (DtEnvironmentSP, DtEnvValueSP objectNode, const DtVrfSubObjectParameterList &) |
| virtual void | updateFormationTable (const DtObjectType &, const DtFormationTable &) |
| Updates modified formation table. | |
| virtual DtEmbarkationInformation | embarkationInformationFor (const DtObjectType &) const |
| Returns a list of embarkation slots and all relevant information about embarkation. | |
| virtual DtEmbarkationInformation | embarkationInformationFor (DtEnvironmentSP, DtEnvValueSP objectNode) const |
| virtual void | updateEmbarkationInformation (const DtObjectType &, const DtEmbarkationInformation &) |
| Updates the embarkation slots into the given object's modified environment. | |
| virtual void | updateEmbarkationInformation (DtEnvironmentSP, DtEnvValueSP objectNode, const DtEmbarkationInformation &) |
| virtual DtDIGuyInformation | diGuyInformationFor (const DtObjectType &) const |
| Returns di-guy information for the specified object. | |
| virtual void | updateDIGuyInformation (const DtObjectType &, const DtDIGuyInformation &) |
| Updates di-guy information for the specified object. | |
| virtual DtSensorSignatureInformation | sensorSignatureInformationFor (const DtObjectType &) const |
| Returns sensor signature information for the specified object. | |
| virtual DtSensorSignatureInformation | sensorSignatureInformationFor (DtEnvironmentSP, DtEnvValueSP root) const |
| virtual void | updateSensorSignatureInformation (const DtObjectType &, const DtSensorSignatureInformation &) |
| Updates sensor signature information information for the specified object. | |
| virtual void | updateSensorSignatureInformation (DtEnvironmentSP, DtEnvValueSP root, const DtSensorSignatureInformation &) |
| virtual DtFormationTable * | formationTableFor (const DtObjectType &) |
| Returns a list of formable table objects associated with the given entity type modified environment. | |
| virtual DtFormationTable * | originalFormationTableFor (const DtObjectType &) |
| virtual Dt3dBoundingVolume | boundingVolumeFor (const DtObjectType &) const |
| Returns bounding volume for the given object. | |
| virtual bool | isAggregate (const DtObjectType &) const |
| Returns true if this object is an aggregate. | |
| bool | loaded () const |
| const DtOrderedObjectTypeList < EntityData * > & | entityData () const |
| virtual bool | saveData () |
| Walks through all the data and saves it out. Will make current data the modified data. | |
| virtual bool | saveFavorites () |
| Saves out the favorites file. | |
| virtual DtObjectType | templateObjectType (const std::string ¶meterType) const |
| Given the parameter type, returns the first item that matches that type's object type. | |
| virtual void | addInternalItem (const std::string &, bool markDataAsWell=true) |
| Adds a new item to the internal items list. This is the name of the reader/writer variable. | |
| virtual std::vector < DtReaderWriter * > | supportPointsFor (const DtObjectType &) const |
| Returns a list of support points (left/right/other) for the given entity. | |
| virtual DtObjectType | uniqueEntityTypeFrom (const DtObjectType &) const |
| Returns a new entity type that is unique based on the supplied type. | |
| const DtModelSet * | modelSet () const |
| DtModelSet * | modelSet () |
| virtual makVrv::DtForceManager * | forceManager () |
| const DtSimulationModelSet & | simulationModelSet () const |
| const DtFilename & | parameterFilename () const |
| const DtComponentSystemDatabase * | systemDatabase () const |
| DtFilename | modelSetDirectory () const |
| virtual void | forceRemoved (DtForceType forceType) |
| const DtRwForces & | allForces () const |
| virtual std::vector< const DtComponentSystemDefinition * > | systemDefinitionsFor (const DtObjectType &o) const |
| virtual const DtReaderWriter * | findVariable (const DtVariableBindingsList &, const DtString &) const |
Static Public Member Functions | |
| static DtSimulationModelSetLoader & | instance (makVrv::DtDe &) |
| static void | registerInstance (makVrv::DtDe &, DtSimulationModelSetLoader *) |
| static DtSimulationModelSetLoader * | create (makVrv::DtDe *) |
Protected Types | |
| typedef std::map< std::string, EntityData * > | ParametersData |
Protected Member Functions | |
| virtual void | markInternalItemsAsReadOnly (DtVariableBindingsList *) |
| There are certain items that are kept in internal structures that are written out directly to the environment. | |
| virtual void | loadSystemFilesFromDirectory (const QString &directoryName, const DtVariableBindingsList &variableBindings) |
| virtual void | cleanup () |
| virtual bool | saveForceHostility (const DtFilename &filename) |
| virtual bool | warned (const DtFilename &) |
| virtual void | removeEntityFromSubObjects (const DtObjectType &) |
| virtual DtModelSet * | createFavoritesFromModelSet (DtModelSet *s) |
| For any item that has a force specified add that to a new favorites set and clear out the forces from the specified set. | |
| virtual void | mergeFavoritesIntoModelSet (DtModelSet *favorites, DtModelSet *set) |
| virtual DtVariableBindingsList * | copyBindingsList (const DtVariableBindingsList *orig) const |
| virtual EntityData * | createParameterDataFrom (DtVrfObjectParameters *) const |
| virtual DtFormationTable * | formationTableFor (DtEnvironmentSP, DtEnvValueSP objectNode) const |
| virtual void | updateFormationTable (DtEnvironmentSP, DtEnvValueSP objectNode, const DtFormationTable &) |
| Will also write out formation files. | |
| virtual std::vector< EntityData * > | addDataFromFile (const std::string &file) |
| virtual void | addModelSetEntriesFromEnvironment (DtEnvironmentSP, DtEnvValueSP node) |
| virtual void | addToInternalCategories (DtModelSetEntry *entry) |
Protected Attributes | |
| QStringList | myWarned |
| DtSimulationModelSet | mySimulationModelSet |
| DtComponentSystemDatabase * | mySystemDatabase |
| DtFilename | myParameterFilename |
| DtModelSet * | myModelSet |
| DtRwForces | myAllForces |
| QStringList | myDefaultCategories |
| QStringList | myDefaultDeployedCountries |
| makVrv::DtDe & | myDe |
| makVrv::DtDe * | myDisplayDe |
| bool | myLoaded |
| DtOrderedObjectTypeList < EntityData * > | myEntityData |
| ParametersMap | myAvailableParameters |
| ParametersData | myParametersData |
| std::set< std::string > | myInternalItems |
| DtModelSet * | myFavoritesModelSet |
Private Member Functions | |
| DtSimulationModelSetLoader (const DtSimulationModelSetLoader &) | |
| DtSimulationModelSetLoader & | operator= (const DtSimulationModelSetLoader &) |
| typedef std::map<DtString, DtVrfObjectParameters*> DtSimulationModelSetLoader::ParametersMap |
| typedef boost::shared_ptr<EnvironmentContainer> DtSimulationModelSetLoader::EnvironmentContainerSP |
|
protected |
| DtSimulationModelSetLoader::DtSimulationModelSetLoader | ( | makVrv::DtDe & | ) |
default constructor
|
virtual |
|
private |
|
virtual |
|
virtual |
|
static |
|
static |
|
virtual |
|
virtual |
|
private |
|
virtual |
Returns true if there is a file named with the supplied file. Strips paths and such.
|
virtual |
Copies the data file from the specified location into the simulation model set data directory and loads it into the gui.
If there is a matching named file then it will not be added
|
virtual |
Returns the platform of the particular item.
|
virtual |
Returns the platform file.
| DtFilename DtSimulationModelSetLoader::getSystemDirectory | ( | ) | const |
| DtFilename DtSimulationModelSetLoader::getFormationDirectory | ( | ) | const |
| DtFilename DtSimulationModelSetLoader::path | ( | ) | const |
|
inline |
Returns the filename of the current simulation model set file.
References DtSimulationModelSet::filename(), and mySimulationModelSet.
|
virtual |
|
virtual |
Loads all the data files in the data directory of the simulation model set.
Loads all the parameter files in the parameter directory of the simulation model set.
|
virtual |
Creates the model set list from the loaded data files.
|
virtual |
If there is no model entry, will create one with the object type, using the object types string as a label.
Will not add it to the .mst file, but rather will keep it in a separate list
|
virtual |
Returns a model set entry based on the environment that contains a guiInformation entry.
|
virtual |
|
virtual |
Reverts the data to previous settings.
|
virtual |
Returns the variable bindings for the given object type.
|
virtual |
Returns true if an original (unmodified) model contains the object type or if a modified version does.
Returns true if an original (unmodified) model contains the object name or if a modified version does.
|
inlinevirtual |
|
virtual |
Given an object type crete source an backup variables of the given RW type (if it exists).
Returns false if no rw type to match or named item already exists
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Schedules the model for "deletion".
|
virtual |
|
virtual |
|
virtual |
Changes object type on model and data. Returns true if successful.
|
virtual |
Changes match type on data. Returns true if successful.
|
virtual |
Updates the model set entry information into the modified model data's gui information section.
If one does not exist, creates one
|
virtual |
Updates data about systems (adds, removes or modifies)
|
virtual |
Returns all the model set entries that share the given system.
|
virtual |
Loads the specified system file into the system database.
|
virtual |
Updates all the data from the bindings into the modified data.
|
virtual |
Converts the registry data to the XML environment format.
|
virtual |
Removes the system of the given name from the supplied environment.
|
virtual |
Adds the given system to the environment.
|
virtual |
|
virtual |
|
inline |
References myDefaultCategories.
|
inline |
References myDefaultCategories.
|
inline |
References myDefaultCategories.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inline |
References myDefaultDeployedCountries.
|
inline |
References myDefaultDeployedCountries.
|
inline |
References myDefaultDeployedCountries.
|
virtual |
|
virtual |
|
virtual |
Returns new variable bindings for the specified system.
|
virtual |
Adds a new entity of the given type based on the supplied type.
Will create a clone of the data found. If no data exists no entity will be created
|
virtual |
Adds a new entity of the given the supplied platform type.
Will add all the variables from the platform as starting points for the new entity
| DtModelSetEntry* DtSimulationModelSetLoader::addNewEntity | ( | EntityData * | baseData, |
| const DtObjectType & | newType, | ||
| const DtString & | name, | ||
| const DtRwNLengthStringVector & | categories, | ||
| const DtString & | uniqueID | ||
| ) |
Adds a new entity given the base data. Will clone the data and add new based on it.
|
virtual |
Removes the current system from the system database.
|
virtual |
|
virtual |
|
virtual |
|
static |
|
virtual |
Scans all subordinate lists for the old type and changes it to the new type.
|
virtual |
Returns a list of subordinate objects associated with the given entity type modified environment.
|
virtual |
|
virtual |
Updates the subordinate objects into the given object's modified environment.
|
virtual |
|
virtual |
Updates modified formation table.
|
virtual |
Returns a list of embarkation slots and all relevant information about embarkation.
|
virtual |
|
virtual |
Updates the embarkation slots into the given object's modified environment.
|
virtual |
|
virtual |
Returns di-guy information for the specified object.
|
virtual |
Updates di-guy information for the specified object.
|
virtual |
Returns sensor signature information for the specified object.
|
virtual |
|
virtual |
Updates sensor signature information information for the specified object.
|
virtual |
|
virtual |
Returns a list of formable table objects associated with the given entity type modified environment.
|
virtual |
|
virtual |
Returns bounding volume for the given object.
|
virtual |
Returns true if this object is an aggregate.
|
inline |
|
inline |
|
virtual |
Walks through all the data and saves it out. Will make current data the modified data.
|
virtual |
Saves out the favorites file.
|
virtual |
Given the parameter type, returns the first item that matches that type's object type.
|
virtual |
Adds a new item to the internal items list. This is the name of the reader/writer variable.
|
virtual |
Returns a list of support points (left/right/other) for the given entity.
Changing the reader/writer values supplied will change the modified values of the entity
|
virtual |
Returns a new entity type that is unique based on the supplied type.
|
inline |
References myModelSet.
|
inline |
References myModelSet.
|
virtual |
|
inline |
References mySimulationModelSet.
|
inline |
References myParameterFilename.
| const DtComponentSystemDatabase* DtSimulationModelSetLoader::systemDatabase | ( | ) | const |
| DtFilename DtSimulationModelSetLoader::modelSetDirectory | ( | ) | const |
|
virtual |
|
inline |
References myAllForces.
|
virtual |
|
virtual |
|
protectedvirtual |
There are certain items that are kept in internal structures that are written out directly to the environment.
These items also appear in the bindings list. This routine will find those items and mark them as read-only. Items can be added to this list by calling the "addInternalItem" method
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
For any item that has a force specified add that to a new favorites set and clear out the forces from the specified set.
Later the forces will be added back in for gui usage
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Will also write out formation files.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
Referenced by simulationModelSet(), and simulationModelSetFilename().
|
protected |
|
protected |
Referenced by parameterFilename().
|
protected |
Referenced by modelSet().
|
protected |
Referenced by allForces().
|
protected |
Referenced by addDefaultCategory(), defaultCategories(), and setDefaultCategories().
|
protected |
Referenced by addDefaultDeployedCountry(), defaultDeployedCountries(), and setDefaultDeployedCountries().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |