}
CaptureString(&PropertyValue, FALSE);
-
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+
+ ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken);
}
}
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
-
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
-
- }
+ ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken);
}
}
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty()){
-
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
-
- }
+ ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken);
}
}
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty()){
-
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
-
- }
+ ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken);
}
}
+void ProcessTokens(wxString *PropertyName,
+ wxString *PropertyValue,
+ wxString *PropertyTokens,
+ bool *FirstToken){
+
+ if (!PropertyName->IsEmpty() && !PropertyValue->IsEmpty() && *PropertyName != wxT("TYPE")){
+
+ if (*FirstToken == TRUE){
+
+ PropertyTokens->Append(*PropertyName + wxT("=") + *PropertyValue);
+ *FirstToken = FALSE;
+
+ } else {
+
+ PropertyTokens->Append(wxT(";") + *PropertyName + wxT("=") + *PropertyValue);
+
+ }
+
+ }
+
+}
+
void ProcessStringValue(wxString *PropertyName,
wxString PropertyNameMatch,
std::map<int,wxString> *MapPtr,
}
-void ProcessIntegerValue(std::map<int,int> *PrefPtr,
- wxString *PropertyValue,
- int *ItemCount){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue->ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
-
- PrefPtr->erase(*ItemCount);
- PrefPtr->insert(std::make_pair(*ItemCount, PriorityNumber));
-
- }
-
-}
-
void SplitValues(wxString *PropertyLine,
std::map<int,int> *SplitPoints,
std::map<int,int> *SplitLength,