mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
MaxVoidsPerElement
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user