![]() |
VR-Forces Development_Version Class Documentation
|
The DtNavigationFeatureStringParser parses the object attributes found in the strings used by streamed object marker names. More...

Public Types | |
| typedef boost::unordered_map < std::string, std::string > | ParsedAttributeValueMap |
| This type defines a map from attribute name to the value we parsed for it. | |
Public Member Functions | |
| virtual | ~DtNavigationFeatureStringParser () |
| virtual DTOR | |
| virtual void | parse (const std::string &stringToParse) |
| Break the string supplied with a streamed object into its component tokens and build the ParsedAttributeValueMap. | |
| virtual std::string | attributeValue (const std::string &attrName) const |
| Get the attribute value for the specified attribute name for the most recently parsed string. | |
| virtual const ParsedAttributeValueMap & | results () const |
| Get the map of all attributes and associated values for the most recently parsed string. | |
| virtual bool | readFeatureMappingFile (const std::string &path, const std::string &objectMappingsFileName)=0 |
| Read the file that specifies the values to use for each S57 attribute. | |
| virtual void | insertAttributeValue (std::pair< std::string, std::string > newPair) |
| Insert a new pair into the parsed results. | |
| virtual void | clearParseResultStrings () |
| Clear the results map in preparation for a new parse. | |
Protected Member Functions | |
| DtNavigationFeatureStringParser () | |
| CTOR. | |
| virtual void | getAttributeValue (const std::string &attr, const std::string &valueString)=0 |
| Given ATTRIBUTE=VALUE, find the value and place into the results map. | |
Protected Attributes | |
| ParsedAttributeValueMap | myAttributeValueResultsMap |
The DtNavigationFeatureStringParser parses the object attributes found in the strings used by streamed object marker names.
The string is a ':' separated list; The fields provide the attribute/value pairs in the form ATTRIBUTE=VALUE. Value comes directly from an S-57 data (or a shape file extracted from S-57). These values may themselves be comma-separated lists of values.
Example: The following could be a the marker name in the .earth file: "COLOUR=" + [COLOUR] + ":TOPSHP=" + [TOPSHP] + ":CATSPM=" + [CATSPM] When the marker is streamed in, osgEarth replaces [COLOUR] with the attribute values in the S-57 or shape file, say 3, 1, and 8 respectively. Then the resulting marker string is "COLOUR=3:TOPSHP=1:CATSPM=8". These are broken down into attribute/value pairs that can then be accessed by the DtNavigationFeatureBuilder. Some attributes with multiple numbers may be concatenated (or only choose the first item)
| typedef boost::unordered_map< std::string, std::string> makVrv::DtNavigationFeatureStringParser::ParsedAttributeValueMap |
This type defines a map from attribute name to the value we parsed for it.
|
virtual |
virtual DTOR
|
protected |
CTOR.
|
virtual |
Break the string supplied with a streamed object into its component tokens and build the ParsedAttributeValueMap.
|
virtual |
Get the attribute value for the specified attribute name for the most recently parsed string.
|
virtual |
Get the map of all attributes and associated values for the most recently parsed string.
|
pure virtual |
Read the file that specifies the values to use for each S57 attribute.
Implemented in makVrv::DtLightMarkerStringParser, and makVrv::DtNavMarkStringParser.
|
virtual |
Insert a new pair into the parsed results.
|
virtual |
Clear the results map in preparation for a new parse.
Reimplemented in makVrv::DtLightMarkerStringParser.
|
protectedpure virtual |
Given ATTRIBUTE=VALUE, find the value and place into the results map.
Implemented in makVrv::DtLightMarkerStringParser, and makVrv::DtNavMarkStringParser.
|
protected |