Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added the ProcessIntegerValue subroutine.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 28 Dec 2015 01:37:21 +0000 (01:37 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 28 Dec 2015 01:37:21 +0000 (01:37 +0000)
source/contacteditor/ContactDataObject.cpp
source/contacteditor/ContactDataObject.h

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, 
index 4cf459d..9e1be8a 100644 (file)
@@ -618,4 +618,9 @@ void CheckType(wxString *PropertySeg1,
        int *intPrevValue, 
        PropertyType *intType);
 
+void ProcessIntegerValue(ContactDataObject *ContactData,
+       std::map<int,int> *KeyListPref, 
+       wxString *PropertyValue, 
+       int *KeyCount);
+
 #endif
\ No newline at end of file
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