VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes
DtMsdlHierarchyPropertyMappings Class Reference

Public Types

typedef std::map< std::string,
std::string > 
StringMap
typedef std::map< std::string,
int > 
StringIntMap
typedef std::map< int,
std::string > 
IntStringMap

Public Member Functions

 DtMsdlHierarchyPropertyMappings ()
 CTOR.
 DtMsdlHierarchyPropertyMappings (const DtMsdlHierarchyPropertyMappings &)
virtual ~DtMsdlHierarchyPropertyMappings ()
 DTOR.
DtMsdlHierarchyPropertyMappingsoperator= (const DtMsdlHierarchyPropertyMappings &)
virtual std::string mapHierarchyItemToSidc (const std::string &msdlHierarchy) const
 Return a mapping of hierarchy code to SIDC code.
virtual std::string mapSidcToName (const std::string &sidc) const
 Return the name for the SIDC code.
virtual std::string mapSidcToHierarchyItem (const std::string &sidc) const
virtual std::string mapEntityTypeToSidc (const DtEntityType &) const
 Maps a DIS enumeration to SIDC code.
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.
virtual DtEntityType mapSidcToEntityType (const std::string &, const std::string &countryCode="US") const
 Converts an SIDC to an entity type.
virtual DtEntityType mapSidcToTacticalGraphicType (const std::string &sidcCode, const std::string &symbolClass) const
 Converts the tactical graphic type/symbol class to entity type.
virtual std::string mapCountryEnumerationToCountryCode (int) const
 Maps a country enumeration to 2 digit country code.
virtual std::string mapCountryCodeToCountryName (const std::string &) const
 Returns the country name given the country code.
virtual bool loadMsdlSidcMappingsFile (const DtFilename &)
 Loads the mapping file.
virtual bool loadCountryCodesMappingFile (const DtFilename &)
 Loads the country codes mapping file.
virtual bool save ()
 Saves msdl mappings to file loaded from.
virtual bool save (const DtFilename &)
 Saves msdl mappings to specified file.
virtual void merge (const DtMsdlHierarchyPropertyMappings &)
 Merges in the contents of the given hierarchy to this (replaces and adds, but does not delete missing items)
virtual std::string findClosestSidc (const std::string &source) const
 Finds the closest SIDC to the supplied on given the hierarchy to SIDC mapping.
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>="">
virtual void addToHierarchyMapping (const std::string &enumeration, const std::string &sidcCode)
 Adds to hierarchy mapping. Format is: <hier>=<sidc code>="">
virtual void addToNameMapping (const std::string &sidcCode, const std::string &name)
 Adds to name mappings. Format is <sidc>.name = name.
virtual void addToDisMapping (const std::string &sidcCode, const std::string &entityType)
 Adds to dis mappings. Format is <sidc>.dis = entity type.
virtual void addCountryCode (const std::string &, int)
 Adds a country code.
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)
const StringMapcountryCodeToNameMap () const
 Returns country code to name map.
const StringMapsidcToNameMap () const
 Returns the SIDC to name map.

Public Attributes

StringMap myHierarchyItemToSidc
StringMap mySidcToHierarchyItem
StringMap mySidcToName
StringMap mySidcToDisEnumeration
StringMap myCountryCodeToCountryName
StringIntMap myCountryCodes
IntStringMap myCountryEnumerationCodes
std::set< std::string > mySidcCodes
DtFilename myFile

Member Typedef Documentation

typedef std::map<std::string, std::string> DtMsdlHierarchyPropertyMappings::StringMap
typedef std::map<std::string, int> DtMsdlHierarchyPropertyMappings::StringIntMap
typedef std::map<int, std::string> DtMsdlHierarchyPropertyMappings::IntStringMap

Constructor & Destructor Documentation

DtMsdlHierarchyPropertyMappings::DtMsdlHierarchyPropertyMappings ( )

CTOR.

DtMsdlHierarchyPropertyMappings::DtMsdlHierarchyPropertyMappings ( const DtMsdlHierarchyPropertyMappings )
virtual DtMsdlHierarchyPropertyMappings::~DtMsdlHierarchyPropertyMappings ( )
virtual

DTOR.

Member Function Documentation

DtMsdlHierarchyPropertyMappings& DtMsdlHierarchyPropertyMappings::operator= ( const DtMsdlHierarchyPropertyMappings )
virtual std::string DtMsdlHierarchyPropertyMappings::mapHierarchyItemToSidc ( const std::string &  msdlHierarchy) const
virtual

Return a mapping of hierarchy code to SIDC code.

virtual std::string DtMsdlHierarchyPropertyMappings::mapSidcToName ( const std::string &  sidc) const
virtual

Return the name for the SIDC code.

virtual std::string DtMsdlHierarchyPropertyMappings::mapSidcToHierarchyItem ( const std::string &  sidc) const
virtual
virtual std::string DtMsdlHierarchyPropertyMappings::mapEntityTypeToSidc ( const DtEntityType &  ) const
virtual

Maps a DIS enumeration to SIDC code.

If there is no direct mapping will attempt to map based on aggregate type. If there is no mapping will return empty string.

virtual int DtMsdlHierarchyPropertyMappings::mapCountryCodeToDisEnumeration ( const std::string &  ) const
virtual
virtual DtEntityType DtMsdlHierarchyPropertyMappings::mapSidcToDisEnumeration ( const std::string  sidcCode,
const std::string &  countryCode = "US" 
) const
virtual

Check DIS Enumeration map for match.

Also fills in blanks four country code if specified. If not specified sets country code to US

virtual DtEntityType DtMsdlHierarchyPropertyMappings::mapSidcToEntityType ( const std::string &  ,
const std::string &  countryCode = "US" 
) const
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 DtEntityType DtMsdlHierarchyPropertyMappings::mapSidcToTacticalGraphicType ( const std::string &  sidcCode,
const std::string &  symbolClass 
) const
virtual

Converts the tactical graphic type/symbol class to entity type.

virtual std::string DtMsdlHierarchyPropertyMappings::mapCountryEnumerationToCountryCode ( int  ) const
virtual

Maps a country enumeration to 2 digit country code.

virtual std::string DtMsdlHierarchyPropertyMappings::mapCountryCodeToCountryName ( const std::string &  ) const
virtual

Returns the country name given the country code.

If country code is > 2 characters, shortened to 2 characters for search

virtual bool DtMsdlHierarchyPropertyMappings::loadMsdlSidcMappingsFile ( const DtFilename &  )
virtual

Loads the mapping file.

virtual bool DtMsdlHierarchyPropertyMappings::loadCountryCodesMappingFile ( const DtFilename &  )
virtual

Loads the country codes mapping file.

virtual bool DtMsdlHierarchyPropertyMappings::save ( )
virtual

Saves msdl mappings to file loaded from.

virtual bool DtMsdlHierarchyPropertyMappings::save ( const DtFilename &  )
virtual

Saves msdl mappings to specified file.

virtual void DtMsdlHierarchyPropertyMappings::merge ( const DtMsdlHierarchyPropertyMappings )
virtual

Merges in the contents of the given hierarchy to this (replaces and adds, but does not delete missing items)

virtual std::string DtMsdlHierarchyPropertyMappings::findClosestSidc ( const std::string &  source) const
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 void DtMsdlHierarchyPropertyMappings::addSidcCode ( const std::string &  )
virtual
virtual void DtMsdlHierarchyPropertyMappings::addToCountryCodeToCountryNameMapping ( const std::string &  countrycode,
const std::string &  countryname 
)
virtual

Adds to country code/country name mapping. Format is: <country_code>.ccode=<country name>="">

virtual void DtMsdlHierarchyPropertyMappings::addToHierarchyMapping ( const std::string &  enumeration,
const std::string &  sidcCode 
)
virtual

Adds to hierarchy mapping. Format is: <hier>=<sidc code>="">

virtual void DtMsdlHierarchyPropertyMappings::addToNameMapping ( const std::string &  sidcCode,
const std::string &  name 
)
virtual

Adds to name mappings. Format is <sidc>.name = name.

virtual void DtMsdlHierarchyPropertyMappings::addToDisMapping ( const std::string &  sidcCode,
const std::string &  entityType 
)
virtual

Adds to dis mappings. Format is <sidc>.dis = entity type.

virtual void DtMsdlHierarchyPropertyMappings::addCountryCode ( const std::string &  ,
int   
)
virtual

Adds a country code.

virtual void DtMsdlHierarchyPropertyMappings::merge ( StringMap ,
const StringMap  
)
virtual

Merges in the contents of the given hierarchy to this (replaces and adds, but does not delete missing items)

const StringMap& DtMsdlHierarchyPropertyMappings::countryCodeToNameMap ( ) const

Returns country code to name map.

const StringMap& DtMsdlHierarchyPropertyMappings::sidcToNameMap ( ) const

Returns the SIDC to name map.

Member Data Documentation

StringMap DtMsdlHierarchyPropertyMappings::myHierarchyItemToSidc
StringMap DtMsdlHierarchyPropertyMappings::mySidcToHierarchyItem
StringMap DtMsdlHierarchyPropertyMappings::mySidcToName
StringMap DtMsdlHierarchyPropertyMappings::mySidcToDisEnumeration
StringMap DtMsdlHierarchyPropertyMappings::myCountryCodeToCountryName
StringIntMap DtMsdlHierarchyPropertyMappings::myCountryCodes
IntStringMap DtMsdlHierarchyPropertyMappings::myCountryEnumerationCodes
std::set<std::string> DtMsdlHierarchyPropertyMappings::mySidcCodes
DtFilename DtMsdlHierarchyPropertyMappings::myFile

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)