bool NewLine = false;
bool SkipMode = false;
bool ColonFound = false;
+ bool QuoteMode = false;
char BufferChar = 0;
int StringDataSize = LoadStringData->size();
int SeekCount = 0;
NewLine = false;
+ } else if ((*LoadStringData)[SeekCount] == '\"'){
+
+ if (QuoteMode == false){
+ QuoteMode = true;
+ } else {
+ QuoteMode = false;
+ }
+
+ BufferChar = (*LoadStringData)[SeekCount];
+
+ if (ColonFound == false){
+ PropertyName += BufferChar;
+ } else {
+ PropertyValue += BufferChar;
+ }
+
} else if (NewLine == true){
// Character is on a new line but not a space or
// the lists.
if (ColonFound == true){
- ObjectName.insert(ObjectName.end(), PropertyName);
- ObjectData.insert(ObjectData.end(), PropertyValue);
+ ObjectName.push_back(PropertyName);
+ ObjectData.push_back(PropertyValue);
}
ColonFound = false;
NewLine = true;
- } else if ((*LoadStringData)[SeekCount] == ':'){
+ } else if ((*LoadStringData)[SeekCount] == ':' &&
+ QuoteMode == false){
// Character is the colon. Set the colon
// found boolen to true.
- ColonFound = true;
+ BufferChar = (*LoadStringData)[SeekCount];
+
+ if (ColonFound == true){
+ PropertyValue += BufferChar;
+ } else {
+ ColonFound = true;
+ }
} else {
PropertyName.size() > 0 &&
PropertyValue.size() > 0){
- ObjectName.insert(ObjectName.end(), PropertyName);
- ObjectData.insert(ObjectData.end(), PropertyValue);
+ ObjectName.push_back(PropertyName);
+ ObjectData.push_back(PropertyValue);
}
}
+ ProcessBaseData();
ProcessData();
return StringProcResult;
}
+}
+
+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 calendar scale (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