hpx/logging/message.hpp

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace util
namespace logging
class message
#include <message.hpp>

Optimizes the formatting for prepending and/or appending strings to the original message.

It keeps all the modified message in one string. Useful if some formatter needs to access the whole string at once.

reserve() - the size that is reserved for prepending (similar to string::reserve function)

Note : as strings are prepended, reserve() shrinks.

Public Functions

message()
message(std::stringstream msg)

Parameters
  • msg: - the message that is originally cached

message(message &&other)
template<typename T>
message &operator<<(T &&v)
template<typename ...Args>
message &format(boost::string_ref format_str, Args const&... args)
std::string const &full_string() const

returns the full string

bool empty() const

Private Members

std::stringstream m_str
bool m_full_msg_computed
std::string m_full_msg

Friends

std::ostream &operator<<(std::ostream &os, message const &value)