MaxVoidsPerElement

This commit is contained in:
Thomas Krijnen
2026-07-09 22:14:31 +02:00
parent 552576fcc3
commit 241b276de0
5 changed files with 109 additions and 5 deletions
+9
View File
@@ -290,6 +290,15 @@ std::string logger::get_log() {
return log_stream_.str();
}
std::size_t logger::count(const std::string& code) {
std::lock_guard<std::mutex> lock(mutex_);
std::size_t count = 0;
for (const auto& message : log_messages_) {
count += code == message.code;
}
return count;
}
void logger::clear() {
std::lock_guard<std::mutex> lock(mutex_);
log_stream_.str(std::string());
+2
View File
@@ -24,6 +24,7 @@
#include "express.h"
#include <boost/scope_exit.hpp>
#include <cstddef>
#include <cstdint>
#include <exception>
#include <map>
@@ -136,6 +137,7 @@ class IFC_PARSE_API logger {
void progress_bar(int progress);
std::string get_log();
std::size_t count(const std::string& code);
void clear();
void append(logger& other);
void print_performance_stats();