Commit 1a23148e authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[status] provide access to reason-specific rejections

parent 5a954bcb
......@@ -165,10 +165,32 @@ public:
{ return curCount + idCountPair.second; });
}
/*!
* \brief Returns the rejected entity count.
*/
std::size_t getRejectedCount() const
{
const auto data = getRejectionData();
return std::accumulate(data.begin(),
data.end(),
0,
[] (const auto& curCount, const auto& reasonCountPair)
{ return curCount + reasonCountPair.second; });
}
/*!
* \brief Returns the rejected entity count for a specific reason.
*/
std::size_t getRejectedCount(const std::string& reason) const
{
auto it = rejectedCount_.find(reason);
return it != rejectedCount_.end() ? it->second : 0;
}
/*!
* \brief Get information on rejection events.
*/
auto getRejectionData() const
std::unordered_map<std::string, std::size_t> getRejectionData() const
{
auto result = rejectedCount_;
if (unspecifiedRejectedCount_ > 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment