MallocBuf

C malloc allocated array wrapper

Destructor

~this
~this()
Undocumented in source.

Members

Functions

clear
void clear()

free allocated memory, set length to 0

fill
void fill(T value)

fill buffer with specified value

opDollar
uint opDollar()

array[$]

opIndex
T opIndex(uint index)

const arrayindex;

opIndex
T opIndex(uint index)

ref arrayindex;

opIndexAssign
void opIndexAssign(uint index, T value)

arrayindex = value;

opIndexAssign
void opIndexAssign(uint index, T[] values)

arrayindex = value;

opSlice
T[] opSlice(uint a, uint b)

arraya..b

opSlice
T[] opSlice()

array[]

reserve
void reserve(uint size)

make sure buffer capacity is at least (size) items

Properties

length
uint length [@property getter]

get length

length
uint length [@property setter]

set new length

ptr
T* ptr [@property getter]

get pointer

Meta