From fc09ab48fbdbbe77b63ce30e051b3118eb006f0b Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 28 Dec 2015 05:27:03 +0000 Subject: [PATCH] Created the ProcessTokens subroutine. --- source/contacteditor/ContactDataObject.cpp | 22 ++++++++++++++++++++++ source/contacteditor/ContactDataObject.h | 5 +++++ 2 files changed, 27 insertions(+) diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index 7d8f535..ddb6a57 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -5158,6 +5158,28 @@ void ContactDataObject::ProcessVendor(wxString PropertySeg1, wxString PropertySe } +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 *MapPtr, diff --git a/source/contacteditor/ContactDataObject.h b/source/contacteditor/ContactDataObject.h index 6777544..f542a06 100644 --- a/source/contacteditor/ContactDataObject.h +++ b/source/contacteditor/ContactDataObject.h @@ -618,6 +618,11 @@ void CheckType(wxString *PropertySeg1, int *intPrevValue, PropertyType *intType); +void ProcessTokens(wxString *PropertyName, + wxString *PropertyValue, + wxString *PropertyTokens, + bool FirstToken); + void ProcessIntegerValue(wxString *PropertyName, wxString PropertyNameMatch, std::map *PrefPtr, -- 2.39.5