Contents

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) noexcept

Captures a bool, a char, an integer or a floating-point value.

explicit LogArgument(const char *text) noexcept

Captures a C string; a null pointer prints as (null).

Parameters

text

Must stay valid until the argument is written.

explicit LogArgument(std::string_view text) noexcept

Captures a string view.

Parameters

text

Its characters must stay valid until the argument is written.

explicit LogArgument(const std::string &text) noexcept

Captures a string.

Parameters

text

Must stay valid until the argument is written.

std::size_t write_to(char *buffer, std::size_t capacity) const noexcept

Writes the value as text, cut at the end of the buffer, with no terminator.

Returns

The number of characters written, at most capacity.