| Top |
| #define | dzl_ring_append_val() |
| #define | dzl_ring_get_index() |
| DzlRing * | dzl_ring_sized_new () |
| guint | dzl_ring_append_vals () |
| void | dzl_ring_foreach () |
| DzlRing * | dzl_ring_ref () |
| void | dzl_ring_unref () |
#define dzl_ring_append_val(ring, val) dzl_ring_append_vals(ring, &(val), 1)
Appends a value to the ring buffer. val
must be a variable as it is
referenced to.
#define dzl_ring_get_index(ring, type, i)
Retrieves the value at the given index from the DzlRing. The value
is cast to type
. You may retrieve a pointer to the value within the
array by using &.
[[ gdouble *v = &dzl_ring_get_index(ring, gdouble, 0); gdouble v = dzl_ring_get_index(ring, gdouble, 0); ]]
DzlRing * dzl_ring_sized_new (guint element_size,guint reserved_size,GDestroyNotify element_destroy);
Creates a new instance of DzlRing with the given number of elements.
guint dzl_ring_append_vals (DzlRing *ring,gconstpointer data,guint len);
Appends len
values located at data
.
void dzl_ring_foreach (DzlRing *ring,GFunc func,gpointer user_data);
Calls func
for every item in the DzlRing starting from the most recently
inserted element to the least recently inserted.
DzlRing *
dzl_ring_ref (DzlRing *ring);
Atomically increments the reference count of ring
by one.