CheckType(&PropertySeg1, &SplitPoints, &SplitLength, &intPrevValue, &PropType);
intPrevValue = 6;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
CaptureString(&PropertyValue, FALSE);
- if (PropertyName == wxT("ALTID")){
-
- PicturesListAltID.erase(*PhotoCount);
- PicturesListAltID.insert(std::make_pair(*PhotoCount, PropertyValue));
-
- } else if (PropertyName == wxT("PID")){
-
- PicturesListPID.erase(*PhotoCount);
- PicturesListPID.insert(std::make_pair(*PhotoCount, PropertyValue));
+ ProcessStringValue(&PropertyName, "ALTID", &PicturesListAltID, &PropertyValue, PhotoCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", &PicturesListPID, &PropertyValue, PhotoCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "MEDIATYPE", &PicturesListMediatype, &PropertyValue, PhotoCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", &PicturesListPref, &PropertyValue, PhotoCount, &PropertyMatched);
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(&PicturesListPref, &PropertyValue, PhotoCount);
+ if (PropertyMatched == TRUE){
- } else if (PropertyName == wxT("MEDIATYPE")){
+ PropertyMatched = FALSE;
+ continue;
- PicturesListMediatype.erase(*PhotoCount);
- PicturesListMediatype.insert(std::make_pair(*PhotoCount, PropertyValue));
-
- } else {
+ }
+
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
- // Something else we don't know about so append
- // to the tokens variable.
+ if (FirstToken == TRUE){
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ } else {
+
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}
}
-
+
}
intPropertyLen = PropertySeg2.Len();