VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtNavigationFeatureStringParser Class Referenceabstract

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)

Inheritance diagram for makVrv::DtNavigationFeatureStringParser:
Inheritance graph
[legend]

Public Types

typedef boost::unordered_map
< std::string, std::string > 
ParsedAttributeValueMap
 

Public Member Functions

virtual ~DtNavigationFeatureStringParser ()
 
virtual void parse (const std::string &stringToParse)
 
virtual std::string attributeValue (const std::string &attrName) const
 
virtual const
ParsedAttributeValueMap
results () const
 
virtual bool readFeatureMappingFile (const std::string &path, const std::string &objectMappingsFileName)=0
 
virtual void insertAttributeValue (const std::pair< std::string, std::string > &newPair)
 
virtual void clearParseResultStrings ()
 

Protected Member Functions

 DtNavigationFeatureStringParser ()
 
virtual void getAttributeValue (const std::string &attr, const std::string &valueString)=0
 

Protected Attributes

ParsedAttributeValueMap myAttributeValueResultsMap
 

Member Typedef Documentation

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.

Constructor & Destructor Documentation

virtual makVrv::DtNavigationFeatureStringParser::~DtNavigationFeatureStringParser ( )
virtual

virtual DTOR

makVrv::DtNavigationFeatureStringParser::DtNavigationFeatureStringParser ( )
protected

CTOR.

Member Function Documentation

virtual void makVrv::DtNavigationFeatureStringParser::parse ( const std::string &  stringToParse)
virtual

Break the string supplied with a streamed object into its component tokens and build the ParsedAttributeValueMap.

virtual std::string makVrv::DtNavigationFeatureStringParser::attributeValue ( const std::string &  attrName) const
virtual

Get the attribute value for the specified attribute name for the most recently parsed string.

virtual const ParsedAttributeValueMap& makVrv::DtNavigationFeatureStringParser::results ( ) const
virtual

Get the map of all attributes and associated values for the most recently parsed string.

virtual bool makVrv::DtNavigationFeatureStringParser::readFeatureMappingFile ( const std::string &  path,
const std::string &  objectMappingsFileName 
)
pure virtual

Read the file that specifies the values to use for each S57 attribute.

Implemented in makVrv::DtLightMarkerStringParser, and makVrv::DtNavMarkStringParser.

virtual void makVrv::DtNavigationFeatureStringParser::insertAttributeValue ( const std::pair< std::string, std::string > &  newPair)
virtual

Insert a new pair into the parsed results.

virtual void makVrv::DtNavigationFeatureStringParser::clearParseResultStrings ( )
virtual

Clear the results map in preparation for a new parse.

Reimplemented in makVrv::DtLightMarkerStringParser.

virtual void makVrv::DtNavigationFeatureStringParser::getAttributeValue ( const std::string &  attr,
const std::string &  valueString 
)
protectedpure virtual

Given ATTRIBUTE=VALUE, find the value and place into the results map.

Implemented in makVrv::DtLightMarkerStringParser, and makVrv::DtNavMarkStringParser.

Member Data Documentation

ParsedAttributeValueMap makVrv::DtNavigationFeatureStringParser::myAttributeValueResultsMap
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)