![]() |
VR-Link API Documentation for DIS
|
This class facilitates FOM file sorting based on FOM dependencies. More...
Collaboration diagram for DtFomSorter:Public Member Functions | |
| DtFomSorter () | |
| Constructor. More... | |
| virtual | ~DtFomSorter () |
| Destructor. More... | |
| virtual void | addFom (const DtString &fomFileName, const DtString &fomIdentifcation, const std::vector< DtString > &depedencies) |
| Add the given fom file name, its identification and its depedencies A mapping between the file name and ID/dependencies is created and replaces any mapping the already exists. More... | |
| virtual void | clear () |
| Clear the FOMs and supporting data to start again. More... | |
| virtual void | getSortedFomFileNames (std::vector< DtString > &fomFileNames) |
| Sorts the list of FOM file names once FOM dependency values have been mapped. More... | |
Protected Types | |
| typedef std::pair< int, DtString > | DtCompFomPair |
| typedef std::pair< DtString, int > | DtFomCompPair |
| typedef std::pair< DtString, std::vector< DtString > > | DtFomDepsPair |
| typedef std::multimap< int, DtString > | DtDependencyToFomMMap |
| typedef std::map< DtString, int > | DtFomToDependencyMap |
| typedef std::map< DtString, DtFomDepsPair > | DtFileToDepsPairMap |
| typedef std::map< DtString, DtString > | DtFomToFileMap |
Protected Member Functions | |
| virtual int | mapFomDepedency (const DtString &fomName, std::set< DtString > &visitedFoms) |
| Determine the FOM dependency value (depth) for the given FOM based on a recursive traverse of its depedencies. More... | |
| virtual void | mapFomDepedencies () |
| Map the FOM dependency values for the collected FOM modules. More... | |
| virtual const DtString & | fileNameFromFomName (const DtString &fomName) const |
| Return the FOM file name given the FOM name (identification) More... | |
| virtual const DtString & | fomNameFromFileName (const DtString &fomFileName) const |
| Return the FOM name (identification) given the FOM file name. More... | |
| virtual void | addFomDependencyMapping (int dependencyValue, const DtString &fomName) |
| Add a mapping between a FOM and its dependency value. More... | |
| virtual void | fixDuplicateFomNames () |
| Fix cases where 2 or more FOMs have same name (identification) More... | |
| virtual DtString & | makeUniqueFomName (DtString &fomName) |
| Checks if given FOM name is already known and makes it unique if so. More... | |
This class facilitates FOM file sorting based on FOM dependencies.
The sorting of file names helps prevent conflicts when FOMs are merged. FOM filenames are added along with their FOM identification and list of dependencies (as FOM identifications). After all the required FOMs have been added, the dependency information is processed to give each FOM a dependency depth value. A base FOM without any dependencies is given a value of 0. FOMs with dependencies are given a value of 1 greater than the value of its largest dependency. FOMs are then sorted by their dependency value with the order of FOMs with equal values being arbitrary.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| DtFomSorter::DtFomSorter | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Add the given fom file name, its identification and its depedencies A mapping between the file name and ID/dependencies is created and replaces any mapping the already exists.
|
protectedvirtual |
Add a mapping between a FOM and its dependency value.
|
virtual |
Clear the FOMs and supporting data to start again.
|
protectedvirtual |
Return the FOM file name given the FOM name (identification)
|
protectedvirtual |
Fix cases where 2 or more FOMs have same name (identification)
|
protectedvirtual |
Return the FOM name (identification) given the FOM file name.
|
virtual |
Sorts the list of FOM file names once FOM dependency values have been mapped.
Checks if given FOM name is already known and makes it unique if so.
Changes name if necessary and returns it.
|
protectedvirtual |
Map the FOM dependency values for the collected FOM modules.
|
protectedvirtual |
Determine the FOM dependency value (depth) for the given FOM based on a recursive traverse of its depedencies.
The list of visited FOMS is used to detect circular dependencies (contains the FOMs that have been traversed to get to the given FOM not including the given FOM).
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |