From: Steve Brokenshire Date: Sat, 23 Jan 2016 11:04:04 +0000 (+0000) Subject: Implemented initial version of ProcessTextVectors in common/text.{cpp,h} X-Git-Tag: release-0.02~763 X-Git-Url: http://Server1/repobrowser/?p=xestiacalendar%2F.git;a=commitdiff_plain;h=edbae90db6fd9237515844afadb98f41a025ab1f Implemented initial version of ProcessTextVectors in common/text.{cpp,h} --- diff --git a/source/common/text.cpp b/source/common/text.cpp new file mode 100644 index 0000000..08a732c --- /dev/null +++ b/source/common/text.cpp @@ -0,0 +1,34 @@ +#include "text.h" + +using namespace std; + +multimap ProcessTextVectors(vector *TextProperties, + vector *TextValues, + bool SearchMultiple, + string Property){ + + multimap ProcessResult; + + // Go through each of the values. + + int TextSeekCount = 0; + int TextPropertySize = 0; + int PropertySeekCount = 0; + + for (vector::iterator iter = TextProperties->begin(); + iter != TextProperties->end(); iter++){ + + if (*iter == Property){ + + ProcessResult.insert(make_pair((*TextProperties)[PropertySeekCount], + (*TextValues)[PropertySeekCount])); + + } + + PropertySeekCount++; + + } + + return ProcessResult; + +} \ No newline at end of file diff --git a/source/common/text.h b/source/common/text.h new file mode 100644 index 0000000..d730aae --- /dev/null +++ b/source/common/text.h @@ -0,0 +1,9 @@ +#include +#include +#include +#include + +std::multimap ProcessTextVectors(std::vector *TextProperties, + std::vector *TextValues, + bool SearchMultiple, + std::string Property); \ No newline at end of file