MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
|
#include <LineTailByteSink.h>
Public Member Functions | |
LineTailByteSink () | |
virtual void | WriteBytes (const u8 *data, const u32 len) |
virtual s32 | CanWrite () |
u32 | GetBytesWritten () const |
u32 | GetLines () const |
const char * | GetZString (u32 whichLine) |
void | Trim (u32 lines) |
void | Reset () |
Public Member Functions inherited from MFM::ByteSink | |
virtual void | WriteByte (u8 ch) |
virtual void | WriteNewline () |
void | Print (const char *str, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (const u8 *str, u32 len, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (s32 decimal, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (u32 decimal, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (s64 decimal, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (u64 decimal, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (u32 num, Format::Type code, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (s32 num, Format::Type code, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (u64 num, Format::Type code, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (s64 num, Format::Type code, s32 fieldWidth=-1, u8 padChar= ' ') |
void | Print (ByteSerializable &byteSerializble, s32 argument=0) |
void | Println () |
void | Println (u8 byte) |
void | Println (const char *str) |
void | Println (const u8 *str, u32 len) |
void | Println (s32 decimal) |
void | Println (u32 decimal) |
void | Println (u32 decimal, Format::Type code) |
void | Println (ByteSerializable &byteSerializable, s32 argument=0) |
void | Printf (const char *format,...) |
void | Vprintf (const char *format, va_list &ap) |
A ByteSink that holds up to LINES lines each of up to BYTES_PER_LINE bytes. Excess bytes written to any given line are discarded as by OverflowableCharBufferByteSink. Once more than LINES lines have been written, the oldest lines are silently discarded to make room.
|
inline |
Constructs a new LineTailByteSink and calls Reset()
on it.
|
inlinevirtual |
Checks to see if bytes may be written to this LineTailByteSink . Since this is backed by an OverflowableCharBufferByteSink array, this may always be written to.
true
. Implements MFM::ByteSink.
|
inline |
Gets the number of bytes that have been written to this LineTailByteSink .
|
inline |
Gets the number of lines that have been encountered during the lifetime of this LineTailByteSink .
|
inline |
Get the contents of whichLine as a zero-terminated string. If there is (currently) no line whichLine, return NULL Gets the contents of a line held by this LineTailByteSink , where the line at index 0
is the oldest line .
whichLine | the index of the line to get from this LineTailByteSink . |
whichLine
index in this LineTailByteSink .
|
inline |
Clears this LineTailByteSink , as if it is newly constructed .
|
inline |
Discard the oldest lines lines, if there are that many, otherwise just do a Reset. Discards a number of old lines inside this LineTailByteSink .
lines | The number of lines to discard from this LineTailByteSink . If this is more than the number of lines held , will call Reset() . |
|
inlinevirtual |
Writes a series of bytes to this LineTailByteSink, keeping track of the lines encountered and discarding bytes encountered past the length of a line that is too long.
data | A pointer to the bytes to write to this LineTailByteSink . |
len | The number of bytes wished to write to this LineTailByteSink . All len bytes are written before this method returns . |
Implements MFM::ByteSink.