1#ifndef IPPL_LOGGING_BUFFER_HANDLER_H
2#define IPPL_LOGGING_BUFFER_HANDLER_H
10#include "Communicate/BufferHandler.h"
11#include "Communicate/LogEntry.h"
30 template <
typename MemorySpace>
33 using buffer_type =
typename BufferHandler<MemorySpace>::buffer_type;
34 using size_type =
typename BufferHandler<MemorySpace>::size_type;
60 buffer_type
getBuffer(size_type size,
double overallocation)
override;
104 const std::vector<LogEntry>&
getLogs()
const;
107 std::shared_ptr<BufferHandler<MemorySpace>>
109 std::vector<LogEntry> logEntries_m;
122 void logMethod(
const std::string& methodName,
123 const std::map<std::string, std::string>& parameters);
127#include "Communicate/LoggingBufferHandler.hpp"
Interface for memory buffer handling.
Definition BufferHandler.h:21
Decorator class for buffer management that adds logging capabilities to buffer operations.
Definition LoggingBufferHandler.h:31
LoggingBufferHandler()
Default constructor, creates an internal BufferHandler for managing buffers. This constructor also in...
Definition LoggingBufferHandler.hpp:16
buffer_type getBuffer(size_type size, double overallocation) override
Allocates or retrieves a buffer and logs the action.
Definition LoggingBufferHandler.hpp:23
void freeAllBuffers() override
Frees all buffers and logs the action.
Definition LoggingBufferHandler.hpp:37
size_type getUsedSize() const override
Retrieves the total size of allocated buffers.
Definition LoggingBufferHandler.hpp:50
const std::vector< LogEntry > & getLogs() const
Retrieves the list of log entries.
Definition LoggingBufferHandler.hpp:61
size_type getFreeSize() const override
Retrieves the total size of free buffers.
Definition LoggingBufferHandler.hpp:56
void deleteAllBuffers() override
Deletes all buffers and logs the action.
Definition LoggingBufferHandler.hpp:43
void freeBuffer(buffer_type buffer) override
Frees a buffer and logs the action.
Definition LoggingBufferHandler.hpp:31