class
SushiDSP::LogArgument
Holds one value of a log call: a bool, a character, an integer, a real or text.
- Declared in
include/SushiDSP/log/LogArgument.hpp
Public member functions
template <typename Number, std::enable_if_t< std::is_arithmetic_v< Number >, int > = 0>
explicit LogArgument(Number value) noexceptCaptures a bool, a char, an integer or a floating-point value.
explicit LogArgument(const char *text) noexceptCaptures a C string; a null pointer prints as (null).
Parameters
textMust stay valid until the argument is written.
explicit LogArgument(std::string_view text) noexceptCaptures a string view.
Parameters
textIts characters must stay valid until the argument is written.
explicit LogArgument(const std::string &text) noexceptCaptures a string.
Parameters
textMust stay valid until the argument is written.
std::size_t write_to(char *buffer, std::size_t capacity) const noexceptWrites the value as text, cut at the end of the buffer, with no terminator.
Returns
The number of characters written, at most capacity.

