![]() |
VR-Forces 5.0.2 Developer's Guide
|
Instances of this class split up config files.
Public Member Functions | |
| DtVrfConfigurationFileComposer () | |
| virtual | ~DtVrfConfigurationFileComposer () |
| virtual bool | init () |
| virtual bool | readObjectMap (const DtFilename &objectMap) |
| virtual bool | readObjectMapFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &objectMap) |
| virtual std::set < DtSimulationAddress > | scenarioBackends () const |
| virtual DtBackendMap * | backendMap () |
| virtual DtAddressMap * | objectMap () |
| virtual bool | composeOrderOfBattleFile (const DtFilename &targetFileName, const DtList &files, DtString &sError, void *zf=0) |
| virtual bool | saveOrderOfBattleToZipFile (const DtFilename &targetFileName, const DtList &files, DtString &sError, void *zf=0) |
| virtual bool | saveOrderOfBattleToFile (const DtFilename &targetFileName, const DtList &files, DtString &sError) |
| virtual bool | composeScenarioScriptsFile (const DtFilename &targetFileName, const DtString &files, void *zf=0) |
| virtual bool | composeOrbatFile (const DtFilename &targetFileName, const DtString &files, void *zf=0) |
| virtual bool | composePlanFile (const DtFilename &targetFileName, const DtList &files, void *zf=0) |
| virtual bool | composeHostilityFile (const DtFilename &targetFileName, const DtList &files, void *zf=0) |
| virtual bool | composeScenarioExtrasFile (const DtFilename &targetFileName, const DtList &files, void *zf=0) |
| virtual bool | createMapFile (const DtFilename &targetFileName, const DtList &simAddresses, const DtList &oobFiles, const DtList &planFiles, bool preserveMappings=true, void *zf=0) |
| std::vector< DtFilename > & | customComponentAttachmentFilenames () |
| const std::vector< DtFilename > & | customComponentAttachmentFilenames () const |
| virtual bool | decompose (const DtFilename &orderOfBattle, const DtFilename &plan, const DtFilename &globalPlan, bool &hasGlobalWeatherObject, bool &hasGlobalDynamicTerrainObject) |
| virtual bool | decomposeFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &orderOfBattle, const DtFilename &plan, const DtFilename &globalPlan, bool &hasGlobalWeatherObject, bool &hasGlobalDynamicTerrainObject) |
| virtual bool | decomposeScenarioScriptsFile (const DtFilename &) |
| virtual bool | decomposeScenarioScriptsFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &scriptsFile) |
| virtual bool | decomposeOrbatFile (const DtFilename &) |
| virtual bool | decomposeOrbatFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &orbatFile) |
| virtual bool | decomposeComponentAttachmentFile (const DtFilename &originalFile, unsigned numBackends) |
| virtual const DtFilename & | getComponentAttachmentFile (unsigned idx) const |
| virtual const DtFilename & | tempDirectory () |
| virtual void | setTempDirectory (const DtFilename &f) |
| virtual void | setFilePrefix (const DtString &) |
| virtual const DtString & | filePrefix () const |
| virtual DtFilename * | getOrderOfBattleFile (const DtSimulationAddress &addr) const |
| virtual DtFilename * | getScenarioScriptsFile (const DtSimulationAddress &addr) const |
| virtual DtFilename * | getOrbatFile (const DtSimulationAddress &addr) const |
| virtual DtFilename * | getPlanFile (const DtSimulationAddress &addr) const |
| virtual DtFilename * | getGlobalPlanFile (const DtSimulationAddress &addr) const |
Protected Member Functions | |
| virtual bool | storeFileInZipFile (void *zf, const DtFilename &sourceFile, const DtFilename &destFile) |
| virtual bool | storeStringInZipFile (void *zf, const DtString &, const DtFilename &target) |
| virtual void | clear () |
| virtual bool | createBackendFiles (const DtFilename &origFileName, DtHashList &createdFiles, const char *prefix="(\n", bool *hasGlobalWeatherObject=0, bool *hasGlobalDynamicTerrainObject=0) |
| virtual bool | createBackendFilesFromZip (const DtFilename &zipFile, const DtFilename &origFileName, DtHashList &createdFiles, const char *prefix="(\n", bool *hasGlobalWeatherObject=0, bool *hasGlobalDynamicTerrainObject=0) |
| virtual bool | finalizeBackendFilesParse (const DtFilename &origFileName, DtHashlist &createdFiles, const char *prefix, bool *hasGlobalWeatherObject, bool *hasGlobalDynamicTerrainObject=0) |
| virtual bool | composePlanFileBody (FILE *fp, const DtList &files) |
| virtual bool | composePlanFileBody (DtString &fp, const DtList &files) |
| virtual bool | fastProcess (const DtFilename &fullname, FILE *fp, DtString *returnBuffer, int &size) |
| virtual bool | fastProcessPlanFileBody (const DtFilename &fullname, FILE *fp, DtString *returnBuffer, int &size) |
Protected Attributes | |
| DtBackendMap * | myBackendMap |
| DtAddressMap * | myObjectMap |
| DtAddressMap * | myOriginalObjectMap |
| DtVrfFileParser | myParser |
| DtHashlist | myAddr2FileMap |
| DtHashlist | myCreatedPlnFiles |
| DtHashlist | myCreatedOobFiles |
| DtHashlist | myCreatedGlobalPlanFiles |
| DtHashlist | myCreatedHostilityFiles |
| std::vector< DtFilename > | myCreatedComponentAttachmentFiles |
| DtFilename | myTempDirectory |
| DtList | myRequiredBackendAddrs |
| DtFilename * | myScenarioScriptsFile |
| DtFilename * | myOrbatFile |
| DtString | myFilePrefix |
Static Protected Attributes | |
| static DtUUID | theUnknownMappingName |
| DtVrfConfigurationFileComposer::DtVrfConfigurationFileComposer | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
initializes myObjectMap and myBackendMap
|
virtual |
Reads the given object map into myObjectMap.
|
virtual |
|
virtual |
Get a list of backends referenced in myObjectMap. Be sure to call readObjectMap() to initialize the map before calling this function.
|
virtual |
returns myBackendMap
|
virtual |
returns myObjectMap
|
virtual |
Concatenates all the order of battles files pointed to in the files DtList into one single file named targetFileName.
|
virtual |
Saves the order of battle file information to the specified zip file.
|
virtual |
|
virtual |
Concatenates all the scenario script files pointed to in the files DtList into one single file named targetFileName. Since there is only one scenario script file there will only be one file in the files list.
|
virtual |
Concatenates all the orbat files pointed to in the files DtList into one single file named targetFileName. Since there is only one orbat file there will only be one file in the files list.
|
virtual |
Concatenates all the plan files pointed to in the files DtList into one single file named targetFileName.
|
virtual |
Concatenates all the force hostility files pointed to in the files DtList into one single file named targetFileName.
|
virtual |
Concatenates all the force scenario-extras files pointed to in the files DtList into one single file named targetFileName.
|
virtual |
Creates a map file named targetFileName.
|
inline |
References myCreatedComponentAttachmentFiles.
|
inline |
References myCreatedComponentAttachmentFiles.
|
virtual |
Decompose the given .oob and .pln files into separate files for each back-end based on the omp file. New files will be placed in the temporary directory specified by DtScenarioFileComposer::tempDirectory(). The names of the newly created files will be stored in hashlists which can be accessed later by getFiles() methods below. These lists will be cleared the next time decomposeScenario is called. Returns true upon success; false otherwise.
|
virtual |
|
virtual |
Decomposes the scenario script file. Since there is only a single file this will simply create a file copy for each backend.
|
virtual |
|
virtual |
Decomposes the orbat file. Since there is only a single file this will simply create a file copy for each backend.
|
virtual |
|
virtual |
Split the indicated component attachment file into separate temporary files, for distribution during scenario load.
|
virtual |
Get a configuration file for the given simulation address.
|
virtual |
Get a configuration file for the given simulation address.
|
virtual |
Get a configuration file for the given simulation address.
|
virtual |
Get a configuration file for the given simulation address.
|
virtual |
Get a configuration file for the given simulation address.
|
virtual |
Get the componentAttachmentFile for a given back end, by index.
|
virtual |
Set/Get the temp directory where generated file names will get stored.
|
virtual |
|
virtual |
Sets a prefix to add before the default temp file name.
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Applicable to both global and entity plans. Concatenates the plan files together and writes them to the specified file.
|
protectedvirtual |
|
protectedvirtual |
Attempt to read file into memory and process there as a faster method.
|
protectedvirtual |
Attempt to read file into memory and process there as a faster method for the plan file body.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by customComponentAttachmentFilenames().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
The name used to create a mapping which indicates there is map data missing.