X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2Fcalendarevent%2FCalendarEvent.cpp;h=823edcedc62fd77880ce1e61358a096fbd5ae171;hb=88a5b0d1ed4ffe6e7bfb2e7c41d651eb8745bcc6;hp=7cc99a4d563af689da6ebfdda11fdd027f24fcbf;hpb=cebb37aa7d20bc00003fc9c66b8a75a75a071dd7;p=xestiacalendar%2F.git diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 7cc99a4..823edce 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -271,7 +271,7 @@ void CalendarEventObject::ProcessData(){ } - // Get the Class value. + // Process the data from CLASS. DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CLASS"); @@ -289,4 +289,92 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from CREATED. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CREATED"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + DateTimeCreatedTokens = DataReceived.begin()->first.substr(8); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + DateTimeCreatedData = DataReceived.begin()->second; + + } + + // 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; + + } + }