X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2Fcalendartask%2FCalendarTask.cpp;h=36933b11f701c6e04001fbf67133a74d82c68809;hb=64f16356b21e7d3930a804decbbf31a545360bdc;hp=4e56efb7c3b6536ab1927ca7e6693f86d75e649a;hpb=c778e14122779caa69c6d6e3ccb64672c5721c9e;p=xestiacalendar%2F.git diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index 4e56efb..36933b1 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -138,4 +138,105 @@ CalendarObjectValidResult CalendarTaskObject::ValidObject(){ void CalendarTaskObject::ProcessData(){ + // Process the data. + + multimap DataReceived; + map PropertyData; + string *PropertyNameData = nullptr; + int ObjectSeekCount = 0; + + // Get the Date Time Stamp (DTSTAMP). + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTAMP"); + + // Process the data from DTSTAMP. + + if (DataReceived.begin() != DataReceived.end()){ + + try { + DateTimeStampTokens = DataReceived.begin()->first.substr(8); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + DateTimeStampData = DataReceived.begin()->second; + + } + + // Get the Unique ID (UID). + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID"); + + // Process the data from UID. + + if (DataReceived.begin() != DataReceived.end()){ + + try { + UniqueIDTokens = DataReceived.begin()->first.substr(4); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + UniqueID = DataReceived.begin()->second; + + } + + // Process the data from CLASS. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CLASS"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + ClassDataTokens = DataReceived.begin()->first.substr(6); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + ClassData = DataReceived.begin()->second; + + } + + // Process the data from COMPLETED. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "COMPLETED"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + CompletedDataTokens = DataReceived.begin()->first.substr(10); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + CompletedData = DataReceived.begin()->second; + + } + + // 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; + + } + } \ No newline at end of file