+int TraceCallStack::FindIndexFromMethodAndParams(std::string method, const TraceCallStack::NamedParams& params) const
+{
+ int32_t index = -1;
+ for(size_t i = 0; i < mCallStack.size(); i++)
+ {
+ if(0 == mCallStack[i].method.compare(method))
+ {
+ // Test each of the passed in parameters:
+ bool match = true;
+ for(NamedParams::const_iterator iter = params.begin(); iter != params.end(); ++iter)
+ {
+ NamedParams::const_iterator paramIter = mCallStack[i].namedParams.find(iter->first);
+ if(paramIter == params.end() || paramIter->second.compare(iter->second) != 0)
+ {
+ match = false;
+ break;
+ }
+ }
+ if(match == true)
+ {
+ index = static_cast<int32_t>(i);
+ break;
+ }
+ }
+ }
+ return index;
+}
+