TelephoneListPID->insert(std::make_pair(*TelephoneCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
- TelephoneListPref->erase(*TelephoneCount);
- TelephoneListPref->insert(std::make_pair(*TelephoneCount, PriorityNumber));
-
- }
+ ProcessIntegerValue(this, TelephoneListPref, &PropertyValue, TelephoneCount);
} else {
} else if (PropertyName == wxT("PREF")){
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
-
- LanguageListPref->erase(*LanguageCount);
- LanguageListPref->insert(std::make_pair(*LanguageCount, PriorityNumber));
-
- }
+ ProcessIntegerValue(this, LanguageListPref, &PropertyValue, LanguageCount);
} else {
GeopositionListMediatype->insert(std::make_pair(*GeographicCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
- if (ValidNumber == TRUE){
-
- GeopositionListPref->erase(*GeographicCount);
- GeopositionListPref->insert(std::make_pair(*GeographicCount, PriorityNumber));
-
- }
+ ProcessIntegerValue(this, GeopositionListPref, &PropertyValue, GeographicCount);
} else {
}
} else if (PropertyName == wxT("LANGUAGE")){
-
- GeneralRelatedListLanguage.erase(*RelatedCount);
- GeneralRelatedListLanguage.insert(std::make_pair(*RelatedCount, PropertyValue));
+
+ ProcessIntegerValue(this, &GeneralRelatedListPref, &PropertyValue, RelatedCount);
} else if (PropertyName != wxT("TYPE")) {
WebsiteListPID->insert(std::make_pair(*URLCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
- if (ValidNumber == TRUE){
-
- WebsiteListPref->erase(*URLCount);
- WebsiteListPref->insert(std::make_pair(*URLCount, PriorityNumber));
-
- }
-
+ ProcessIntegerValue(this, WebsiteListPref, &PropertyValue, URLCount);
+
} else if (PropertyName == wxT("MEDIATYPE")){
WebsiteListMediatype->erase(*URLCount);
TitleListPID->insert(std::make_pair(*TitleCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
- if (ValidNumber == TRUE){
-
- TitleListPref->erase(*TitleCount);
- TitleListPref->insert(std::make_pair(*TitleCount, PriorityNumber));
-
- }
-
+ ProcessIntegerValue(this, TitleListPref, &PropertyValue, TitleCount);
+
} else if (PropertyName == wxT("LANGUAGE")){
TitleListLanguage->erase(*TitleCount);
RoleListPID->insert(std::make_pair(*RoleCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
-
- RoleListPref->erase(*RoleCount);
- RoleListPref->insert(std::make_pair(*RoleCount, PriorityNumber));
- }
-
+ ProcessIntegerValue(this, RoleListPref, &PropertyValue, RoleCount);
+
} else if (PropertyName == wxT("LANGUAGE")){
RoleListLanguage->erase(*RoleCount);
OrganisationsListSortAs->insert(std::make_pair(*OrganisationCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
-
- OrganisationsListPref->erase(*OrganisationCount);
- OrganisationsListPref->insert(std::make_pair(*OrganisationCount, PriorityNumber));
- }
-
+ ProcessIntegerValue(this, OrganisationsListPref, &PropertyValue, OrganisationCount);
+
} else if (PropertyName == wxT("LANGUAGE")){
OrganisationsListLanguage->erase(*OrganisationCount);
NoteListPID->insert(std::make_pair(*NoteCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
- NoteListPref->erase(*NoteCount);
- NoteListPref->insert(std::make_pair(*NoteCount, PriorityNumber));
-
- }
-
+ ProcessIntegerValue(this, NoteListPref, &PropertyValue, NoteCount);
+
} else if (PropertyName == wxT("LANGUAGE")){
NoteListLanguage->erase(*NoteCount);