pcb 4.1.1
An interactive printed circuit board layout editor.

fifo.c File Reference

#include "gts.h"
Include dependency graph for fifo.c:

Go to the source code of this file.

Data Structures

struct  _GtsFifo

Functions

GtsFifogts_fifo_new ()
void gts_fifo_write (GtsFifo *fifo, FILE *fp)
void gts_fifo_push (GtsFifo *fifo, gpointer data)
gpointer gts_fifo_pop (GtsFifo *fifo)
gpointer gts_fifo_top (GtsFifo *fifo)
guint gts_fifo_size (GtsFifo *fifo)
void gts_fifo_destroy (GtsFifo *fifo)
gboolean gts_fifo_is_empty (GtsFifo *fifo)
void gts_fifo_foreach (GtsFifo *fifo, GtsFunc func, gpointer data)
void gts_fifo_reverse (GtsFifo *fifo)

Function Documentation

void gts_fifo_destroy ( GtsFifo fifo)

gts_fifo_destroy: : a GtsFifo.

Frees all the memory allocated for .

Definition at line 138 of file fifo.c.

References _GtsFifo::head.

Referenced by gts_delaunay_conform(), gts_delaunay_refine(), gts_graph_traverse_destroy(), gts_surface_traverse_destroy(), and walk_faces().

void gts_fifo_foreach ( GtsFifo fifo,
GtsFunc  func,
gpointer  data 
)

gts_fifo_foreach: : a GtsFifo. : a GtsFunc. : user data to be passed to .

Calls in order for each item in , passing .

Definition at line 166 of file fifo.c.

References _GtsFifo::tail.

Referenced by gts_delaunay_conform(), and gts_delaunay_refine().

gboolean gts_fifo_is_empty ( GtsFifo fifo)

gts_fifo_is_empty: : a GtsFifo.

Returns: TRUE if is empty, FALSE otherwise.

Definition at line 151 of file fifo.c.

References _GtsFifo::head, and TRUE.

Referenced by gts_delaunay_refine().

GtsFifo* gts_fifo_new ( void  )

gts_fifo_new:

Returns: a new GtsFifo.

Definition at line 32 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

Referenced by gts_delaunay_conform(), gts_delaunay_refine(), gts_graph_traverse_new(), gts_surface_traverse_new(), and walk_faces().

gpointer gts_fifo_pop ( GtsFifo fifo)

gts_fifo_pop: : a GtsFifo.

Removes the first element from .

Returns: the first element in or NULL if is empty.

Definition at line 87 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

Referenced by gts_graph_traverse_next(), gts_surface_traverse_next(), split_encroached(), and walk_faces().

void gts_fifo_push ( GtsFifo fifo,
gpointer  data 
)

gts_fifo_push: : a GtsFifo. : data to add to .

Push into .

Definition at line 70 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

Referenced by gts_graph_traverse_new(), gts_surface_traverse_new(), make_encroached_fifo(), push_neighbor(), split_encroached(), vertex_encroaches(), and walk_faces().

void gts_fifo_reverse ( GtsFifo fifo)

gts_fifo_reverse: : a GtsFifo.

Reverses the order of elements in .

Definition at line 186 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

guint gts_fifo_size ( GtsFifo fifo)

gts_fifo_size: : a GtsFifo.

Returns: the number of elements in .

Definition at line 125 of file fifo.c.

References _GtsFifo::head.

Referenced by gts_delaunay_conform().

gpointer gts_fifo_top ( GtsFifo fifo)

gts_fifo_top: : a GtsFifo.

Returns: the first element in or NULL if is empty.

Definition at line 110 of file fifo.c.

References _GtsFifo::tail.

Referenced by gts_graph_traverse_what_next().

void gts_fifo_write ( GtsFifo fifo,
FILE *  fp 
)

gts_fifo_write: : a GtsFifo. : a file pointer.

Writes the content of in .

Definition at line 47 of file fifo.c.

References _GtsFifo::head.