X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2Fcalendarevent%2FCalendarEvent.cpp;h=655d7defd68213e416539fe9f6c5604226b7490d;hb=bc4101e33e39ade01665e0580e172930d6e5cde4;hp=b35f7c186a1865f6e07761acc29745cb0ddd4f56;hpb=bf2991fbc983e84044e5efd42e154babe65f5517;p=xestiacalendar%2F.git diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index b35f7c1..655d7de 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -307,4 +307,92 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from DESCRIPTION. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DESCRIPTION"); + + if (DataReceived.begin() != DataReceived.end()){ + + bool TokenData = false; + string PropertyTokens; + + PropertyNameData = (string*)&DataReceived.begin()->first; + + PropertyData = SplitValues(*PropertyNameData); + + for(map::iterator iter = PropertyData.begin(); + iter != PropertyData.end(); iter++){ + + if (iter->first == "ALTREP"){ + + DescriptionListAltRep.clear(); + DescriptionListAltRep.push_back(iter->second); + + } else if (iter->first == "LANGUAGE"){ + + DescriptionListLanguage.clear(); + DescriptionListLanguage.push_back(iter->second); + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + DescriptionListTokens.clear(); + DescriptionListTokens.push_back(PropertyTokens); + } + + DescriptionList.clear(); + DescriptionList.push_back(DataReceived.begin()->second); + + } + + // Process the data from GEO. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "GEO"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + GeographicTokens = DataReceived.begin()->first.substr(4); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + GeographicData = DataReceived.begin()->second; + + } + + // Process the data from LAST-MODIFIED. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "LAST-MODIFIED"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + LastModifiedTokens = DataReceived.begin()->first.substr(14); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + LastModifiedData = DataReceived.begin()->second; + + } + }