X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2Fcalendartask%2FCalendarTask.cpp;h=5d4a59b5d5a30e86e8374883df56145b43b2bb38;hb=541fa587a54619ff8193ba2991d2d73eb8c408e7;hp=cb2285711f1f2783f9026e051994c080b7fadd14;hpb=454dcc0988ad8d52e9e6dcaa436edae7a382695e;p=xestiacalendar%2F.git diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index cb22857..5d4a59b 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -185,4 +185,110 @@ void CalendarTaskObject::ProcessData(){ } + // 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; + + } + + // 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); + + } + } \ No newline at end of file