![]() |
VR-Forces 4.10 Class Documentation
|
Public Types | |
| typedef std::map< std::string, std::string > | StringMap |
| typedef std::multimap < std::string, std::string > | StringMultiMap |
| typedef std::map< std::string, int > | StringIntMap |
| typedef std::map< int, std::string > | IntStringMap |
Public Member Functions | |
| DtMsdlHierarchyPropertyMappings () | |
| CTOR. More... | |
| DtMsdlHierarchyPropertyMappings (const DtMsdlHierarchyPropertyMappings &) | |
| virtual | ~DtMsdlHierarchyPropertyMappings () |
| DTOR. More... | |
| DtMsdlHierarchyPropertyMappings & | operator= (const DtMsdlHierarchyPropertyMappings &) |
| virtual std::string | mapHierarchyItemToSidc (const std::string &msdlHierarchy) const |
| Return a mapping of hierarchy code to SIDC code. More... | |
| virtual std::string | mapSidcToName (const std::string &sidc) const |
| Return the name for the SIDC code. More... | |
| virtual std::string | mapSidcToHierarchyItem (const std::string &sidc) const |
| virtual void | mapUnitSubcategoryToSidc (std::string &sidc, const DtEntityType &entType) const |
| Changes characters in positions 4-9 (0-based) of the SIDC string according to the subcategory of the entity type, given that it is a unit. More... | |
| virtual void | mapUnitCategoryToSidc (std::string &sidc, const DtEntityType &entType) const |
| Changes characters in positions 10-11 (0-based) of the SIDC string according to the echelon given in the category of the entity type, given that the entity type is a unit. More... | |
| virtual std::string | mapEntityTypeToSidc (const DtEntityType &) const |
| Maps a DIS enumeration to SIDC code. More... | |
| virtual int | mapCountryCodeToDisEnumeration (const std::string &) const |
| virtual DtEntityType | mapSidcToDisEnumeration (const std::string sidcCode, const std::string &countryCode="US") const |
| Check DIS Enumeration map for match. More... | |
| virtual DtEntityType | mapSidcToEntityType (const std::string &, const std::string &countryCode="US") const |
| Converts an SIDC to an entity type. More... | |
| virtual DtEntityType | mapSidcToTacticalGraphicType (const std::string &sidcCode, const std::string &symbolClass) const |
| Converts the tactical graphic type/symbol class to entity type. More... | |
| virtual std::string | mapCountryEnumerationToCountryCode (int) const |
| Maps a country enumeration to 2 digit country code. More... | |
| virtual std::string | mapCountryCodeToCountryName (const std::string &) const |
| Returns the country name given the country code. More... | |
| virtual bool | loadMsdlSidcMappingsFile (const DtFilename &) |
| Loads the mapping file. More... | |
| virtual bool | loadCountryCodesMappingFile (const DtFilename &) |
| Loads the country codes mapping file. More... | |
| virtual bool | save () |
| Saves msdl mappings to file loaded from. More... | |
| virtual bool | save (const DtFilename &) |
| Saves msdl mappings to specified file. More... | |
| virtual void | merge (const DtMsdlHierarchyPropertyMappings &) |
| Merges in the contents of the given hierarchy to this (replaces and adds, but does not delete missing items) More... | |
| virtual std::string | findClosestSidc (const std::string &source) const |
| Finds the closest SIDC to the supplied on given the hierarchy to SIDC mapping. More... | |
| virtual void | addSidcCode (const std::string &) |
| virtual void | addToCountryCodeToCountryNameMapping (const std::string &countrycode, const std::string &countryname) |
| Adds to country code/country name mapping. Format is: <country_code>.ccode=<country name>=""> More... | |
| virtual void | addToHierarchyMapping (const std::string &enumeration, const std::string &sidcCode) |
| Adds to hierarchy mapping (myHierarchyItemToSidc). Format is: <hier>=<sidc code>=""> More... | |
| virtual void | addToDataItemMapping (const std::string &sidcCode, const std::string &name, const std::string &entityType, const std::string &hierarchy) |
| Adds to sidc data items mapping. More... | |
| virtual void | clearHierarchyMappings () |
| Clears the hierarchy data from the items mapping. More... | |
| virtual void | addCountryCode (const std::string &, int) |
| Adds a country code. More... | |
| virtual void | merge (StringMap &, const StringMap &) |
| Merges in the contents of the given hierarchy to this (replaces and adds, but does not delete missing items) More... | |
| virtual void | merge (StringToDataItemMultiMap &toMergeInto, const StringToDataItemMultiMap &toMergeFrom) |
| const StringMap & | countryCodeToNameMap () const |
| Returns country code to name map. More... | |
| const StringToDataItemMultiMap & | sidcToDataItemMultiMap () const |
| Returns the SIDC to data item multimap. More... | |
Public Attributes | |
| StringMap | myHierarchyItemToSidc |
| StringMap | myCountryCodeToCountryName |
| StringIntMap | myCountryCodes |
| IntStringMap | myCountryEnumerationCodes |
| StringToDataItemMultiMap | mySidcToDataItems |
| std::set< std::string > | mySidcCodes |
| DtFilename | myFile |
| typedef std::map<std::string, std::string> DtMsdlHierarchyPropertyMappings::StringMap |
| typedef std::multimap<std::string, std::string> DtMsdlHierarchyPropertyMappings::StringMultiMap |
| typedef std::map<std::string, int> DtMsdlHierarchyPropertyMappings::StringIntMap |
| typedef std::map<int, std::string> DtMsdlHierarchyPropertyMappings::IntStringMap |
| DtMsdlHierarchyPropertyMappings::DtMsdlHierarchyPropertyMappings | ( | ) |
CTOR.
| DtMsdlHierarchyPropertyMappings::DtMsdlHierarchyPropertyMappings | ( | const DtMsdlHierarchyPropertyMappings & | ) |
|
virtual |
DTOR.
| DtMsdlHierarchyPropertyMappings& DtMsdlHierarchyPropertyMappings::operator= | ( | const DtMsdlHierarchyPropertyMappings & | ) |
|
virtual |
Return a mapping of hierarchy code to SIDC code.
|
virtual |
Return the name for the SIDC code.
|
virtual |
|
virtual |
Changes characters in positions 4-9 (0-based) of the SIDC string according to the subcategory of the entity type, given that it is a unit.
|
virtual |
Changes characters in positions 10-11 (0-based) of the SIDC string according to the echelon given in the category of the entity type, given that the entity type is a unit.
|
virtual |
Maps a DIS enumeration to SIDC code.
Looks up the DIS in mySidcToDisEnumeration. If there is no direct mapping will generate what it can from the DIS fields. If nothing can be mapped, and empty string is returned.
|
virtual |
|
virtual |
Check DIS Enumeration map for match.
Also fills in blanks four country code by looking up the DIS country number in a map of SIDC country codes -> DIS country numbers (which is taken from country-codes.csv). If the lookup fails to produce a valid number, then the country code is taken from the countryCode argument (which defaults to US).
|
virtual |
Converts an SIDC to an entity type.
Differs from DisEnumeration call in that it will try and parse the SIDC code to fill in some blanks, whereas the DisEnumeration call does not
|
virtual |
Converts the tactical graphic type/symbol class to entity type.
|
virtual |
Maps a country enumeration to 2 digit country code.
|
virtual |
Returns the country name given the country code.
If country code is > 2 characters, shortened to 2 characters for search
|
virtual |
Loads the mapping file.
|
virtual |
Loads the country codes mapping file.
|
virtual |
Saves msdl mappings to file loaded from.
|
virtual |
Saves msdl mappings to specified file.
|
virtual |
Merges in the contents of the given hierarchy to this (replaces and adds, but does not delete missing items)
|
virtual |
Finds the closest SIDC to the supplied on given the hierarchy to SIDC mapping.
Iterates over the hierarchy map and compares the SIDC code to the supplied code
|
virtual |
|
virtual |
Adds to country code/country name mapping. Format is: <country_code>.ccode=<country name>="">
|
virtual |
Adds to hierarchy mapping (myHierarchyItemToSidc). Format is: <hier>=<sidc code>="">
|
virtual |
Adds to sidc data items mapping.
|
virtual |
Clears the hierarchy data from the items mapping.
|
virtual |
Adds a country code.
Merges in the contents of the given hierarchy to this (replaces and adds, but does not delete missing items)
|
virtual |
| const StringMap& DtMsdlHierarchyPropertyMappings::countryCodeToNameMap | ( | ) | const |
Returns country code to name map.
| const StringToDataItemMultiMap& DtMsdlHierarchyPropertyMappings::sidcToDataItemMultiMap | ( | ) | const |
Returns the SIDC to data item multimap.
| StringMap DtMsdlHierarchyPropertyMappings::myHierarchyItemToSidc |
| StringMap DtMsdlHierarchyPropertyMappings::myCountryCodeToCountryName |
| StringIntMap DtMsdlHierarchyPropertyMappings::myCountryCodes |
| IntStringMap DtMsdlHierarchyPropertyMappings::myCountryEnumerationCodes |
| StringToDataItemMultiMap DtMsdlHierarchyPropertyMappings::mySidcToDataItems |
| std::set<std::string> DtMsdlHierarchyPropertyMappings::mySidcCodes |
| DtFilename DtMsdlHierarchyPropertyMappings::myFile |