CalendarObjectValidResult BaseDataResult = ValidBaseObject();
CalendarObjectValidResult EventDataResult = ValidObject();
+ if (BaseDataResult != CALENDAROBJECTVALID_OK ||
+ EventDataResult != CALENDAROBJECTVALID_OK){
+
+ StringProcResult = CALENDAROBJECTLOAD_INVALIDFORMAT;
+
+ } else {
+
+ StringProcResult = CALENDAROBJECTLOAD_OK;
+
+ }
+
+ ProcessBaseData();
+ ProcessData();
+
return StringProcResult;
}
}
}
-
+
+ if (ObjectName[SeekCount] == "END" &&
+ ObjectData[SeekCount] == "VCALENDAR" &&
+ ValidBegin == false){
+
+ return CALENDAROBJECTVALID_INVALIDFORMAT;
+
+ }
+
SeekCount++;
}
}
+}
+
+void CalendarObject::ProcessBaseData(){
+
+ // Process the base object data.
+
+ multimap<string,string> 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;
+
+ }
+
+ // Get the method (CALSCALE).
+
+ DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CALSCALE");
+
+ if (DataReceived.begin() != DataReceived.end()){
+
+ try {
+ CalendarScaleTokens = DataReceived.begin()->first.substr(9);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ CalendarScaleData = DataReceived.begin()->second;
+
+ }
+
}
\ No newline at end of file