Queue

class Queue(pointer: <Error class: unknown class><<Error class: unknown class>>) : Record

Contains the public fields of a glib-Double-ended-Queues.

Skipped during bindings generation

  • parameter free_func: DestroyNotify

  • parameter free_func: DestroyNotify

  • parameter data: gpointer

  • parameter data: gpointer

  • method peek_head: Return type gpointer is unsupported

  • method peek_nth: Return type gpointer is unsupported

  • method peek_tail: Return type gpointer is unsupported

  • method pop_head: Return type gpointer is unsupported

  • method pop_nth: Return type gpointer is unsupported

  • method pop_tail: Return type gpointer is unsupported

  • parameter data: gpointer

  • parameter data: gpointer

  • parameter data: gpointer

  • parameter data: gpointer

  • parameter data: gpointer

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion : RecordCompanion<Queue, <Error class: unknown class>>

Properties

Link copied to clipboard
val glibQueuePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val head: List?

a pointer to the first element of the queue

Link copied to clipboard
var length: <Error class: unknown class>

the number of elements in the queue

Link copied to clipboard
val tail: List?

a pointer to the last element of the queue

Functions

Link copied to clipboard
fun clear()

Removes all the elements in @queue. If queue elements contain dynamically-allocated memory, they should be freed first.

Link copied to clipboard
fun foreach(func: Func)

Calls @func for each element in the queue passing @user_data to the function.

Link copied to clipboard
fun free()

Frees the memory allocated for the #GQueue. Only call this function if @queue was created with g_queue_new(). If queue elements contain dynamically-allocated memory, they should be freed first.

Link copied to clipboard
fun getLength(): <Error class: unknown class>

Returns the number of items in @queue.

Link copied to clipboard
fun init()

A statically-allocated #GQueue must be initialized with this function before it can be used. Alternatively you can initialize it with %G_QUEUE_INIT. It is not necessary to initialize queues created with g_queue_new().

Link copied to clipboard

Returns true if the queue is empty.

Link copied to clipboard
fun reverse()

Reverses the order of the items in @queue.

Link copied to clipboard
fun sort(compareFunc: CompareDataFunc)

Sorts @queue using @compare_func.