Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added the ProcessIntegerValue subroutine.
[xestiaab/.git] / source / contacteditor / ContactDataObject.cpp
index ffca460..532884d 100644 (file)
@@ -5877,6 +5877,31 @@ void ContactDataObject::ProcessVendor(wxString PropertySeg1, wxString PropertySe
 
 }
 
+void ProcessIntegerValue(ContactDataObject *ContactData,
+       std::map<int,int> *KeyListPref, 
+       wxString *PropertyValue, 
+       int *KeyCount){
+
+       int PriorityNumber = 0; 
+       bool ValidNumber = TRUE;
+                       
+       try{
+               PriorityNumber = std::stoi(PropertyValue->ToStdString());
+       }
+                       
+       catch(std::invalid_argument &e){
+               ValidNumber = FALSE;
+       }
+
+       if (ValidNumber == TRUE){
+
+               KeyListPref->erase(*KeyCount);
+               KeyListPref->insert(std::make_pair(*KeyCount, PriorityNumber));
+
+       }
+
+}
+
 void SplitValues(wxString *PropertyLine, 
        std::map<int,int> *SplitPoints, 
        std::map<int,int> *SplitLength, 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy