18 return m_buffer.data();
23 const size_t available = m_buffer.size() - 1 - m_len;
24 const size_t numCharsToAppend = strnlen(message, available);
30 const size_t available = m_buffer.size() - 1 - m_len;
31 const size_t numCharsToAppend = std::min(messageLen, available);
37 if (message.
size() > 0)
39 (void)std::copy(message.
begin(), message.
end(), m_buffer.begin() + m_len);
40 m_len += message.
size();
42 m_buffer.at(m_len) =
'\0';
53 return exception << (value ?
"true" :
"false");
58 std::array<char, 24> integerPartBuffer = {};
59 std::array<char, 24> floatingPartBuffer = {};
60 const char* integerPartString =
nullptr;
61 const char* floatingPartString =
nullptr;
62 convertFloatToString(integerPartBuffer, floatingPartBuffer, value, integerPartString, floatingPartString);
64 if (floatingPartString !=
nullptr)
66 result = result <<
"." << floatingPartString;
74 return exception << (static_cast<float>(value));
const char * what() const noexcept override
CppRuntimeException(const char *message="")
void append(const char *message)
constexpr size_type size() const noexcept
constexpr iterator end() const noexcept
constexpr iterator begin() const noexcept
CppRuntimeException & operator<<(CppRuntimeException &exception, const BasicBitBuffer< ALLOC > &bitBuffer)
void convertFloatToString(std::array< char, 24 > &integerPartBuffer, std::array< char, 24 > &floatingPartBuffer, float value, const char *&integerPartString, const char *&floatingPartString)