• allegro5.a5_display
  • allegro5.a5_file
  • allegro5.a5_font
  • allegro5.a5_image
  • allegro5.a5_joystick
  • allegro5.a5_main
  • allegro5.a5_misc
  • allegro5.a5_opengl
  • allegro5.a5_shader
  • allegro5.a5_sound
  • allegro5.a5_thread
  • allegro5.a5_triangles
  • animation
  • array
  • atlas
  • buffer
  • color
  • common
  • csg.csg_aabb
  • csg.csg
  • csg.csg_octree
  • csg.csg_shapes
  • csg.csg_test
  • data
  • display
  • exception
  • file
  • font
  • glsl
  • grid
  • hash
  • image
  • image_op
  • index
  • ini
  • isometric
  • joystick
  • keyboard
  • land
  • layer
  • list
  • log
  • main
  • map
  • mem
  • mouse
  • net
  • noise
  • openglutil
  • perlin
  • pixelmask
  • plasma
  • pool
  • protobuf
  • queue
  • random
  • runner
  • shader
  • sound
  • sprite
  • thread
  • tilegrid
  • triangles
  • util2d
  • util3d
  • util
  • view
  • voronoi
  • widget.base
  • widget.board
  • widget.book
  • widget.box
  • widget.button
  • widget.checkbox
  • widget.container
  • widget.edit
  • widget.gul
  • widget.hbox
  • widget.layout
  • widget
  • widget.menu
  • widget.mover
  • widget.panel
  • widget.scrollbar
  • widget.scrolling
  • widget.sizer
  • widget.slider
  • widget.spin
  • widget.text
  • widget.theme
  • widget.vbox
  • widget.widget_list
  • yaml.external
  • yaml.internal
  • yaml
  • yaml.xml

land.queue

LandQueue

A queue data structure is used if the elements need to be kept sorted. It allows to quickly pick the minimum element. If you need arbitrary access to the elements, use a LandArray instead. If you need arbitrary removal and insertion, use a LandList. If you need arbitrary access by something besides the index, use a LandHash. If you need multiple properties at once, e.g. arbitrary string lookup as well as sorting, your best bet might be to use two structures at once (or use your own structure).

land_queue_new

Parameters: int(* cmp_cb)(void * data1, void * data2)

Returns: LandQueue*

Create a new queue, with the given comparison function for its elements.

land_queue_del

Parameters: LandQueue * q

Delete the queue. This will not touch the elements that might have been added since its creation.

land_queue_destroy

Parameters: LandQueue * q

land_queue_add

Parameters: LandQueue * q, void * data

Add an element to the queue.

land_queue_pop

Parameters: LandQueue * q

Returns: void*

Return and remove the smallest element in the queue.

land_queue_sort

Parameters: LandQueue * q

Returns: LandArray*

Return an array referencing the same data as the queue. The array will be sorted from smallest to largest element. The queue will be destroyed in the process. So you should set the parameter you passed to this function to None after it returns.

land_queue_for_each

Parameters: LandQueue * self, int(* cb)(void * item, void * data), void * data

Returns: int

Like land_array_for_each. The callback will not be called in any particular order, especially it will not be sorted. (The first call will be the smallest element, but the subsequent order is random.)

land_queue_count

Parameters: LandQueue * self

Returns: int

land_queue_clear

Parameters: LandQueue * self


Generated: Thu 27 Feb 2020 10:49:37 PM EST