}
intPrevValue = 5;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
CaptureString(&PropertyValue, FALSE);
- if (PropertyName == wxT("ALTID")){
-
- RoleListAltID->erase(*RoleCount);
- RoleListAltID->insert(std::make_pair(*RoleCount, PropertyValue));
+ ProcessStringValue(&PropertyName, "ALTID", RoleListAltID, &PropertyValue, RoleCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", RoleListPID, &PropertyValue, RoleCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "LANGUAGE", RoleListLanguage, &PropertyValue, RoleCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", RoleListPref, &PropertyValue, RoleCount, &PropertyMatched);
- } else if (PropertyName == wxT("PID")){
-
- RoleListPID->erase(*RoleCount);
- RoleListPID->insert(std::make_pair(*RoleCount, PropertyValue));
+ if (PropertyMatched == TRUE){
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(RoleListPref, &PropertyValue, RoleCount);
-
- } else if (PropertyName == wxT("LANGUAGE")){
+ PropertyMatched = FALSE;
+ continue;
- RoleListLanguage->erase(*RoleCount);
- RoleListLanguage->insert(std::make_pair(*RoleCount, PropertyValue));
+ }
- } else {
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+
+ if (FirstToken == TRUE){
- // Something else we don't know about so append
- // to the tokens variable.
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ } else {
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}
-
- }
+ }
+
}
// Add the data to the General/Home/Work address variables.