From: Steve Brokenshire Date: Sat, 23 Jan 2016 14:25:26 +0000 (+0000) Subject: Added ProcessBaseData subroutine for processing METHOD. X-Git-Tag: release-0.02~727 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=305cb89d6640707dae7100a654b8c232da093b32;p=xestiacalendar%2F.git Added ProcessBaseData subroutine for processing METHOD. --- diff --git a/source/objects/calendarobject/CalendarObject.cpp b/source/objects/calendarobject/CalendarObject.cpp index 01d939d..0925b45 100644 --- a/source/objects/calendarobject/CalendarObject.cpp +++ b/source/objects/calendarobject/CalendarObject.cpp @@ -155,6 +155,7 @@ CalendarObjectLoadResult CalendarObject::LoadString(std::string *LoadStringData) } + ProcessBaseData(); ProcessData(); return StringProcResult; @@ -255,4 +256,30 @@ CalendarObjectValidResult CalendarObject::ValidBaseObject(){ } +} + +void CalendarObject::ProcessBaseData(){ + + // Process the base object data. + + multimap DataReceived; + + // Get the method (METHOD). + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "METHOD"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + MethodTokens = DataReceived.begin()->first.substr(7); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + MethodData = DataReceived.begin()->second; + + } + } \ No newline at end of file diff --git a/source/objects/calendarobject/CalendarObject.h b/source/objects/calendarobject/CalendarObject.h index 7404216..6d5b1ac 100644 --- a/source/objects/calendarobject/CalendarObject.h +++ b/source/objects/calendarobject/CalendarObject.h @@ -30,6 +30,7 @@ class CalendarObject{ CalendarObjectLoadResult LoadFile(std::string LoadFilename); CalendarObjectLoadResult LoadString(std::string *LoadStringData); CalendarObjectValidResult ValidBaseObject(); + void ProcessBaseData(); // Setup virtual subroutines for use by objects // inheriting from CalendarObject later on. @@ -39,6 +40,9 @@ class CalendarObject{ // Object data. + std::string MethodData; + std::string MethodTokens; + std::string UniqueID; std::string UniqueIDTokens;