From edbae90db6fd9237515844afadb98f41a025ab1f Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 23 Jan 2016 11:04:04 +0000 Subject: [PATCH] Implemented initial version of ProcessTextVectors in common/text.{cpp,h} --- source/common/text.cpp | 34 ++++++++++++++++++++++++++++++++++ source/common/text.h | 9 +++++++++ 2 files changed, 43 insertions(+) create mode 100644 source/common/text.cpp create mode 100644 source/common/text.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 -- 2.39.5