Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:41

0001 // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
0002 // Distributed under the MIT License (http://opensource.org/licenses/MIT)
0003 
0004 #pragma once
0005 
0006 #include <spdlog/details/log_msg.h>
0007 
0008 namespace spdlog {
0009 namespace details {
0010 
0011 // Extend log_msg with internal buffer to store its payload.
0012 // This is needed since log_msg holds string_views that points to stack data.
0013 
0014 class SPDLOG_API log_msg_buffer : public log_msg
0015 {
0016     memory_buf_t buffer;
0017     void update_string_views();
0018 
0019 public:
0020     log_msg_buffer() = default;
0021     explicit log_msg_buffer(const log_msg &orig_msg);
0022     log_msg_buffer(const log_msg_buffer &other);
0023     log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT;
0024     log_msg_buffer &operator=(const log_msg_buffer &other);
0025     log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT;
0026 };
0027 
0028 } // namespace details
0029 } // namespace spdlog
0030 
0031 #ifdef SPDLOG_HEADER_ONLY
0032 #    include "log_msg_buffer-inl.h"
0033 #endif