MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
|
#include <OverflowableCharBufferByteSink.h>
Public Member Functions | |
OverflowableCharBufferByteSink () | |
virtual void | WriteBytes (const u8 *data, const u32 len) |
virtual s32 | CanWrite () |
bool | Equals (const char *str) const |
template<u32 OTHER_SIZE> | |
bool | Equals (const OverflowableCharBufferByteSink< OTHER_SIZE > &str) const |
const char * | GetZString () |
const char * | GetBuffer () const |
u32 | GetLength () const |
u32 | GetCapacity () const |
void | Reset () |
bool | HasOverflowed () const |
OverflowableCharBufferByteSink < BUFSIZE > & | operator= (const char *zstr) |
![]() | |
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 BUFSIZE - 2 data bytes. If that limit is reached, an 'X' is appended at the end of the ByteSink, and further data written is discarded.
|
inline |
Constructs a new CharBufferByteSink representing the empty string.
|
inlinevirtual |
Gets the number of bytes that can be written to this OverflowableCharBufferByteSink .
Implements MFM::ByteSink.
|
inline |
Checks to see if the string represented by this OverflowableCharBufferByteSink is equal to another specified string.
str | The string to check for equality against this OverflowableCharBufferByteSink . |
true
if the string represented by this OverflowableCharBufferByteSink is equal to the string represented by str
, else false
.
|
inline |
Checks to see if the string represented by this OverflowableCharBufferByteSink is equal to another specified OverflowableCharBufferByteSink.
str | The OverflowableCharBufferByteSink to check for equality against this OverflowableCharBufferByteSink |
true
if the string represented by this OverflowableCharBufferByteSink is equal to the string represented by str
, else false
.
|
inline |
Gets the immutable char buffer held by this OverflowableCharBufferByteSink . This is NOT guaranteed to be null terminated!
|
inline |
Gets the total number of bytes that may be written to this OverflowableCharBufferByteSink before it overflows.
|
inline |
Gets the length of the string represented by this OverflowableCharBufferByteSink in bytes .
|
inline |
Gets the immutable char buffer held by this OverflowableCharBufferByteSink . It is guaranteed to be null terminated.
|
inline |
Checks to see whether or not this OverflowableCharBufferByteSink has overflowed, i.e. had more bytes written to it than it can hold.
true
if this OverflowableCharBufferByteSink has overflowed before, else false
.
|
inline |
An operator overload which copies the bytes held at a specified null terminated string to this OverflowableCharBufferByteSink . After this is called, and if there is enough room in this OverflowableCharBufferByteSink , it will represent the specified string.
zstr | The null terminated string which is wished to be represented by this OverflowableCharBufferByteSink . |
|
inline |
Resets the internal state of this OverflowableCharBufferByteSink , making it equivalent to the empty string.
|
inlinevirtual |
Writes a series of bytes to this OveflowableCharBufferByteSink . If overflow occurs, will append an 'X' to the end of this internal string.
bytes | A pointer to the bytes which will be written to this OverflowableCharBufferByteSink . |
len | The number of bytes which will be attempted to be written to this OverflowableCharBufferByteSink . |
Implements MFM::ByteSink.