wxString PropertyValue;
wxString PropertyTokens;
bool FirstToken = TRUE;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
// Process properties.
- if (PropertyName == wxT("ALTID")){
-
- GeopositionListAltID->erase(*GeographicCount);
- GeopositionListAltID->insert(std::make_pair(*GeographicCount, PropertyValue));
+ ProcessStringValue(&PropertyName, "ALTID", GeopositionListAltID, &PropertyValue, GeographicCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", GeopositionListPID, &PropertyValue, GeographicCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "MEDIATYPE", GeopositionListMediatype, &PropertyValue, GeographicCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", GeopositionListPref, &PropertyValue, GeographicCount, &PropertyMatched);
- } else if (PropertyName == wxT("PID")){
-
- GeopositionListPID->erase(*GeographicCount);
- GeopositionListPID->insert(std::make_pair(*GeographicCount, PropertyValue));
+ if (PropertyMatched == TRUE){
- } else if (PropertyName == wxT("MEDIATYPE")){
-
- GeopositionListMediatype->erase(*GeographicCount);
- GeopositionListMediatype->insert(std::make_pair(*GeographicCount, PropertyValue));
+ PropertyMatched = FALSE;
+ continue;
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(GeopositionListPref, &PropertyValue, GeographicCount);
+ }
- } else {
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ if (FirstToken == TRUE){
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
+
+ } else {
+
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}