![]() |
VR-Forces 4.2 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 const DtList & | 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) |
| 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 | composeGlobalPlanFile (const DtFilename &targetFileName, const DtList &files) |
| Concatenates all the global 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, const DtList &globalPlanFiles, 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) |
| 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 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") |
| virtual bool | composePlanFileBody (FILE *fp, const DtList &files) |
| Applicable to both global and entity plans. | |
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 |
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 global 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 |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Applicable to both global and entity plans.
Concatenates the plan files together and writes them to the specified file.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by customComponentAttachmentFilenames().
|
protected |
|
protected |
|
protected |
|
staticprotected |
The name used to create a mapping which indicates there is map data missing.