123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869module juptune.data.buffer;
struct MemoryWriter
{
/++ ALIASES ++/
///
alias __xpostblit = __MARMOS_BUG__;
///
alias putI16BE = __MARMOS_BUG__;
///
alias putI16LE = __MARMOS_BUG__;
///
alias putI32BE = __MARMOS_BUG__;
///
alias putI32LE = __MARMOS_BUG__;
///
alias putI64BE = __MARMOS_BUG__;
///
alias putI64LE = __MARMOS_BUG__;
///
alias putI8 = __MARMOS_BUG__;
///
alias putU16BE = __MARMOS_BUG__;
///
alias putU16LE = __MARMOS_BUG__;
///
alias putU24BE = __MARMOS_BUG__;
///
alias putU24LE = __MARMOS_BUG__;
///
alias putU32BE = __MARMOS_BUG__;
///
alias putU32LE = __MARMOS_BUG__;
///
alias putU64BE = __MARMOS_BUG__;
///
alias putU64LE = __MARMOS_BUG__;
///
alias putU8 = __MARMOS_BUG__;
/++ FUNCTIONS ++/
/// Returns: The underlying buffer passed to the constructor.
ubyte[] buffer();
/// Returns: The number of bytes left in the buffer, for the current cursor position.
ulong bytesLeft();
/// Returns: The current cursor position.
ulong cursor();
/// Sets the cursor position.
void cursor(ulong newCursor);
/// Moves the cursor back by the given number of bytes.
void goBack(ulong count);
/// Advances the cursor by the given number of bytes.
void goForward(ulong count);
///
MemoryWriter opAssign(MemoryWriter p);
///
const ubyte[] putBytesPartial(const ubyte[] bytes);
///
bool putU24(Endian endian)(uint value);
///
bool tryBytes(const ubyte[] bytes);
/// Attempts to write an integral type into the buffer; automatically converting it from big/little endian into the native endianess, and then advances the cursor.
bool tryIntegral(IntT, Endian endian)(IntT value);
///
ubyte[] usedBuffer();
}
| Name | Description |
|---|---|
| __xpostblit | |
| putI16BE | |
| putI16LE | |
| putI32BE | |
| putI32LE | |
| putI64BE | |
| putI64LE | |
| putI8 | |
| putU16BE | |
| putU16LE | |
| putU24BE | |
| putU24LE | |
| putU32BE | |
| putU32LE | |
| putU64BE | |
| putU64LE | |
| putU8 |
| Name | Description |
|---|---|
| buffer |
Returns: The underlying buffer passed to the constructor. |
| bytesLeft |
Returns: The number of bytes left in the buffer, for the current cursor position. |
| cursor |
Returns: The current cursor position. |
| cursor |
Sets the cursor position. |
| goBack |
Moves the cursor back by the given number of bytes. |
| goForward |
Advances the cursor by the given number of bytes. |
| opAssign | |
| putBytesPartial | |
| putU24 | |
| tryBytes | |
| tryIntegral |
Attempts to write an integral type into the buffer; automatically converting it from big/little endian into the native endianess, and then advances the cursor. |
| usedBuffer |