![]() |
VR-Forces Development_Version Class Documentation
|
Instances of this class split up config files. More...
Public Member Functions | |
| DtVrfConfigurationFileComposer () | |
| Constructor. | |
| virtual | ~DtVrfConfigurationFileComposer () |
| Destructor. | |
| virtual bool | init () |
| initializes myObjectMap and myBackendMap | |
| virtual bool | readObjectMap (DtFilename objectMap) |
| Reads the given object map into myObjectMap. | |
| virtual std::set < DtSimulationAddress > | scenarioBackends () const |
| Get a list of backends referenced in myObjectMap. | |
| virtual DtBackendMap * | backendMap () |
| returns myBackendMap | |
| virtual DtAddressMap * | objectMap () |
| returns myObjectMap | |
| virtual bool | composeOrderOfBattleFile (const DtFilename &targetFileName, const DtList &files, DtString &sError) |
| Concatenates all the order of battles files pointed to in the files DtList into one single file named targetFileName. | |
| virtual bool | composeScenarioScriptsFile (const DtFilename &targetFileName, const DtString &files) |
| Concatenates all the scenario script files pointed to in the files DtList into one single file named targetFileName. | |
| virtual bool | composePlanFile (const DtFilename &targetFileName, const DtList &files) |
| Concatenates all the plan files pointed to in the files DtList into one single file named targetFileName. | |
| virtual bool | composeHostilityFile (const DtFilename &targetFileName, const DtList &files) |
| Concatenates all the force hostility files pointed to in the files DtList into one single file named targetFileName. | |
| virtual bool | composeScenarioExtrasFile (const DtFilename &targetFileName, const DtList &files) |
| Concatenates all the force scenario-extras files pointed to in the files DtList into one single file named targetFileName. | |
| virtual bool | createMapFile (const DtFilename &targetFileName, const DtList &simAddresses, const DtList &oobFiles, const DtList &planFiles, bool preserveMappings=true) |
| Creates a map file named targetFileName. | |
| std::vector< DtFilename > & | customComponentAttachmentFilenames () |
| const std::vector< DtFilename > & | customComponentAttachmentFilenames () const |
| virtual bool | decompose (const DtFilename &orderOfBattle, const DtFilename &plan, const DtFilename &globalPlan, bool &hasGlobalWeatherObject) |
| Decompose the given .oob and .pln files into separate files for each back-end based on the omp file. | |
| virtual bool | decomposeScenarioScriptsFile (const DtFilename &) |
| Decomposes the scenario script file. | |
| virtual bool | decomposeComponentAttachmentFile (const DtFilename &originalFile, unsigned numBackends) |
| Split the indicated component attachment file into separate temporary files, for distribution during scenario load. | |
| virtual const DtFilename & | getComponentAttachmentFile (unsigned idx) const |
| Get the componentAttachmentFile for a given back end, by index. | |
| virtual const DtFilename & | tempDirectory () |
| Set/Get the temp directory where generated file names will get stored. | |
| virtual void | setTempDirectory (const DtFilename &f) |
| virtual void | setFilePrefix (const DtString &) |
| Sets a prefix to add before the default temp file name. | |
| virtual const DtString & | filePrefix () const |
| virtual DtFilename * | getOrderOfBattleFile (const DtSimulationAddress &addr) const |
| Get a configuration file for the given simulation address. | |
| virtual DtFilename * | getScenarioScriptsFile (const DtSimulationAddress &addr) const |
| Get a configuration file for the given simulation address. | |
| virtual DtFilename * | getPlanFile (const DtSimulationAddress &addr) const |
| Get a configuration file for the given simulation address. | |
| virtual DtFilename * | getGlobalPlanFile (const DtSimulationAddress &addr) const |
| Get a configuration file for the given simulation address. | |
Protected Member Functions | |
| virtual void | clear () |
| virtual bool | createBackendFiles (const DtFilename &origFileName, DtHashList &createdFiles, const char *prefix="(\n", bool *hasGlobalWeatherObject=0) |
| virtual bool | composePlanFileBody (FILE *fp, const DtList &files) |
| Applicable to both global and entity plans. | |
| virtual bool | fastProcess (const DtFilename &fullname, FILE *fp, int &size) |
| Attempt to read file into memory and process there as a faster method. | |
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 |
| DtString | myFilePrefix |
Static Protected Attributes | |
| static const char | theUnknownMappingName [] |
| The name used to create a mapping which indicates there is map data missing. | |
Instances of this class split up config files.
| DtVrfConfigurationFileComposer::DtVrfConfigurationFileComposer | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
initializes myObjectMap and myBackendMap
|
virtual |
Reads the given object map into myObjectMap.
|
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 |
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 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 |
Decomposes the scenario script file.
Since there is only a single file this will simply create a file copy for each backend
|
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 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 |
Applicable to both global and entity plans.
Concatenates the plan files together and writes them to the specified file.
|
protectedvirtual |
Attempt to read file into memory and process there as a faster method.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by customComponentAttachmentFilenames().
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
The name used to create a mapping which indicates there is map data missing.