Debug text output.
More...
#include <klang.h>
|
static Text | from (const char *in) |
| Create a new Text object from a C-string.
|
|
Definition at line 2173 of file klang.h.
◆ c_str()
◆ capacity()
◆ clear()
void klang::Console::clear |
( |
| ) |
|
|
inline |
◆ from()
Definition at line 331 of file klang.h.
331 {
332 Text text;
333 text = in;
334 return text;
335 }
◆ getText()
int klang::Console::getText |
( |
char * | buffer | ) |
|
|
inline |
◆ hasText()
bool klang::Console::hasText |
( |
| ) |
const |
|
inline |
◆ operator const char *()
◆ operator!=()
bool klang::Text< SIZE >::operator!= |
( |
const char * | in | ) |
const |
|
inlineinherited |
Definition at line 349 of file klang.h.
349 {
351 }
bool operator==(const char *in) const
◆ operator+=()
Console & klang::Console::operator+= |
( |
const char * | in | ) |
|
|
inline |
Definition at line 2199 of file klang.h.
2199 {
2200 std::lock_guard<std::mutex> lock(
_lock);
2201 const int len = std::max(0, std::min(
capacity() -
length, (
int)strlen(in)));
2202 memcpy(&
string[
length], in, len);
2205 memcpy(&
last, in, len);
2207 return *this;
2208 }
static THREAD_LOCAL Text< 16384 > last
References _lock, klang::Text< SIZE >::capacity(), last, and length.
Referenced by klang::Debug::print(), and klang::Debug::printOnce().
◆ operator=() [1/2]
Console & klang::Console::operator= |
( |
const char * | in | ) |
|
|
inline |
◆ operator=() [2/2]
◆ operator==()
bool klang::Text< SIZE >::operator== |
( |
const char * | in | ) |
const |
|
inlineinherited |
Definition at line 344 of file klang.h.
344 {
345 return strcmp(string, in) == 0;
346 }
◆ _lock
std::mutex klang::Console::_lock |
|
inlinestatic |
◆ last
THREAD_LOCAL Text< 16384 > klang::Console::last |
|
inlinestatic |
◆ length
int klang::Console::length = 0 |
◆ string