#define TEST_TRACE_CALL_STACK_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
}
+ const std::ostringstream& operator[](std::string name) const
+ {
+ static std::ostringstream empty;
+ auto iter = mParams.begin();
+ for(; iter != mParams.end(); ++iter)
+ {
+ if(!iter->parameterName.compare(name))
+ {
+ break;
+ }
+ }
+
+ if(iter != mParams.end())
+ {
+ return iter->value;
+ }
+ return empty;
+ }
+
std::string str() const
{
std::ostringstream out;
bool FindMethodAndGetParameters(std::string method, std::string& params) const;
/**
+ * Search for a method in the stack and return its parameters if found
+ * @param[in] method The name of the method
+ * @param[out] params of the method
+ * @return true if the method was in the stack
+ */
+ bool FindMethodAndGetParameters(std::string method, NamedParams& params) const;
+
+ /**
* Count how many times a method was called
* @param[in] method The name of the method
* @return The number of times it was called