![]() |
VR-Forces 4.0.4 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 | 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 | 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 * | 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 |
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.
Constructor.
| virtual DtVrfConfigurationFileComposer::~DtVrfConfigurationFileComposer | ( | ) | [virtual] |
Destructor.
| virtual bool DtVrfConfigurationFileComposer::init | ( | ) | [virtual] |
initializes myObjectMap and myBackendMap
| virtual bool DtVrfConfigurationFileComposer::readObjectMap | ( | DtFilename | objectMap | ) | [virtual] |
Reads the given object map into myObjectMap.
| virtual const DtList& DtVrfConfigurationFileComposer::scenarioBackends | ( | ) | const [virtual] |
Get a list of backends referenced in myObjectMap.
Be sure to call readObjectMap() to initialize the map before calling this function.
| virtual DtBackendMap* DtVrfConfigurationFileComposer::backendMap | ( | ) | [virtual] |
returns myBackendMap
| virtual DtAddressMap* DtVrfConfigurationFileComposer::objectMap | ( | ) | [virtual] |
returns myObjectMap
| virtual bool DtVrfConfigurationFileComposer::composeOrderOfBattleFile | ( | const DtFilename & | targetFileName, |
| const DtList & | files | ||
| ) | [virtual] |
Concatenates all the order of battles files pointed to in the files DtList into one single file named targetFileName.
| virtual bool DtVrfConfigurationFileComposer::composePlanFile | ( | const DtFilename & | targetFileName, |
| const DtList & | files | ||
| ) | [virtual] |
Concatenates all the plan files pointed to in the files DtList into one single file named targetFileName.
| virtual bool DtVrfConfigurationFileComposer::composeGlobalPlanFile | ( | const DtFilename & | targetFileName, |
| const DtList & | files | ||
| ) | [virtual] |
Concatenates all the global plan files pointed to in the files DtList into one single file named targetFileName.
| virtual bool DtVrfConfigurationFileComposer::composeHostilityFile | ( | const DtFilename & | targetFileName, |
| const DtList & | files | ||
| ) | [virtual] |
Concatenates all the force hostility files pointed to in the files DtList into one single file named targetFileName.
| virtual bool DtVrfConfigurationFileComposer::composeScenarioExtrasFile | ( | const DtFilename & | targetFileName, |
| const DtList & | files | ||
| ) | [virtual] |
Concatenates all the force scenario-extras files pointed to in the files DtList into one single file named targetFileName.
| virtual bool DtVrfConfigurationFileComposer::createMapFile | ( | const DtFilename & | targetFileName, |
| const DtList & | simAddresses, | ||
| const DtList & | oobFiles, | ||
| const DtList & | planFiles, | ||
| const DtList & | globalPlanFiles, | ||
| bool | preserveMappings = true |
||
| ) | [virtual] |
Creates a map file named targetFileName.
| std::vector< DtFilename > & DtVrfConfigurationFileComposer::customComponentAttachmentFilenames | ( | ) | [inline] |
References myCreatedComponentAttachmentFiles.
| const std::vector< DtFilename > & DtVrfConfigurationFileComposer::customComponentAttachmentFilenames | ( | ) | const [inline] |
References myCreatedComponentAttachmentFiles.
| virtual bool DtVrfConfigurationFileComposer::decompose | ( | const DtFilename & | orderOfBattle, |
| const DtFilename & | plan, | ||
| const DtFilename & | globalPlan | ||
| ) | [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 bool DtVrfConfigurationFileComposer::decomposeComponentAttachmentFile | ( | const DtFilename & | originalFile, |
| unsigned | numBackends | ||
| ) | [virtual] |
Split the indicated component attachment file into separate temporary files, for distribution during scenario load.
| virtual DtFilename* DtVrfConfigurationFileComposer::getOrderOfBattleFile | ( | const DtSimulationAddress & | addr | ) | const [virtual] |
Get a configuration file for the given simulation address.
| virtual DtFilename* DtVrfConfigurationFileComposer::getPlanFile | ( | const DtSimulationAddress & | addr | ) | const [virtual] |
Get a configuration file for the given simulation address.
| virtual DtFilename* DtVrfConfigurationFileComposer::getGlobalPlanFile | ( | const DtSimulationAddress & | addr | ) | const [virtual] |
Get a configuration file for the given simulation address.
| virtual const DtFilename& DtVrfConfigurationFileComposer::getComponentAttachmentFile | ( | unsigned | idx | ) | const [virtual] |
Get the componentAttachmentFile for a given back end, by index.
| virtual const DtFilename& DtVrfConfigurationFileComposer::tempDirectory | ( | ) | [virtual] |
Set/Get the temp directory where generated file names will get stored.
| virtual void DtVrfConfigurationFileComposer::setTempDirectory | ( | const DtFilename & | f | ) | [virtual] |
| virtual void DtVrfConfigurationFileComposer::clear | ( | ) | [protected, virtual] |
| virtual bool DtVrfConfigurationFileComposer::createBackendFiles | ( | const DtFilename & | origFileName, |
| DtHashList & | createdFiles, | ||
| const char * | prefix = "(\n" |
||
| ) | [protected, virtual] |
| virtual bool DtVrfConfigurationFileComposer::composePlanFileBody | ( | FILE * | fp, |
| const DtList & | files | ||
| ) | [protected, virtual] |
Applicable to both global and entity plans.
Concatenates the plan files together and writes them to the specified file.
DtBackendMap* DtVrfConfigurationFileComposer::myBackendMap [protected] |
DtAddressMap* DtVrfConfigurationFileComposer::myObjectMap [protected] |
std::vector<DtFilename> DtVrfConfigurationFileComposer::myCreatedComponentAttachmentFiles [protected] |
Referenced by customComponentAttachmentFilenames().
DtFilename DtVrfConfigurationFileComposer::myTempDirectory [protected] |
DtList DtVrfConfigurationFileComposer::myRequiredBackendAddrs [protected] |
const char DtVrfConfigurationFileComposer::theUnknownMappingName[] [static, protected] |
The name used to create a mapping which indicates there is map data missing.