alist.c File Reference


Detailed Description

List type used by automaton.

Author:
Antoine Fraboulet
Date:
2005

Definition in file alist.c.

#include <stdlib.h>
#include "alist.h"

Go to the source code of this file.

Data Structures

struct  alist_elt_t
struct  alist_t

Functions

void * alist_elt_get_value (alist_elt e)
 extract the value from an alist element result is untyped si the user should know what the value type is
alist_elt alist_elt_create (void *info)
alist alist_create ()
 list creation
alist alist_clone (alist l)
void alist_set_delete (alist l, void(*f)(void *))
 funtion to use on data during list deletion.
static void alist_delete_rec (alist_elt e, void(*delete_function)(void *))
void alist_delete (alist l)
 delete a complete list.
void alist_add (alist l, void *value)
 add a element to the list
int alist_is_in (alist l, void *e)
 get first element
int alist_equal (alist id1, alist id2)
void alist_insert (alist dst, alist src)
alist_elt alist_get_first (alist l)
alist_elt alist_get_next (alist l, alist_elt e)
 get next element from current
void * alist_pop_first_value (alist l)
int alist_get_size (alist l)
int alist_is_empty (alist l)


Function Documentation

void alist_add alist  l,
void *  value
 

add a element to the list

Definition at line 114 of file alist.c.

References alist_elt_create(), alist_elt_t::next, alist_t::size, and alist_t::start.

Referenced by alist_clone(), alist_insert(), s_automaton_add_state(), s_automaton_id_create(), s_automaton_NFA_to_DFA(), and s_automaton_PS_to_NFA().

alist alist_clone alist  l  ) 
 

Definition at line 75 of file alist.c.

References alist_add(), alist_create(), alist_elt_get_value(), alist_get_first(), and alist_get_next().

Referenced by s_automaton_NFA_to_DFA().

alist alist_create  ) 
 

list creation

Returns:
list

Definition at line 64 of file alist.c.

References alist_t::delete_function, alist_t::size, and alist_t::start.

Referenced by alist_clone(), s_automaton_create(), s_automaton_id_create(), s_automaton_NFA_to_DFA(), s_automaton_PS_to_NFA(), and s_automaton_successor().

void alist_delete alist  l  ) 
 

delete a complete list.

Definition at line 107 of file alist.c.

References alist_delete_rec(), alist_t::delete_function, and alist_t::start.

Referenced by s_automaton_delete(), s_automaton_NFA_to_DFA(), s_automaton_PS_to_NFA(), s_automaton_successor(), and state_delete_fun().

static void alist_delete_rec alist_elt  e,
void(*)(void *)  delete_function
[static]
 

Definition at line 94 of file alist.c.

References alist_elt_t::info, and alist_elt_t::next.

Referenced by alist_delete(), and alist_pop_first_value().

alist_elt alist_elt_create void *  info  ) 
 

Definition at line 50 of file alist.c.

References alist_elt_t::info, and alist_elt_t::next.

Referenced by alist_add().

void* alist_elt_get_value alist_elt  e  ) 
 

extract the value from an alist element result is untyped si the user should know what the value type is

Definition at line 44 of file alist.c.

References alist_elt_t::info.

Referenced by alist_clone(), alist_equal(), alist_insert(), alist_is_in(), s_automaton_get_state(), s_automaton_id_to_str(), s_automaton_node_set_accept(), s_automaton_print_edges(), s_automaton_print_nodes(), s_automaton_PS_to_NFA(), and s_automaton_successor().

int alist_equal alist  id1,
alist  id2
 

Definition at line 134 of file alist.c.

References alist_elt_get_value(), alist_get_first(), alist_get_next(), alist_get_size(), and alist_is_in().

Referenced by s_automaton_get_state().

alist_elt alist_get_first alist  l  ) 
 

Definition at line 163 of file alist.c.

References alist_t::start.

Referenced by alist_clone(), alist_equal(), alist_insert(), alist_is_in(), s_automaton_get_state(), s_automaton_id_to_str(), s_automaton_node_set_accept(), s_automaton_print_edges(), s_automaton_print_nodes(), s_automaton_PS_to_NFA(), and s_automaton_successor().

alist_elt alist_get_next alist  l,
alist_elt  e
 

get next element from current

Definition at line 169 of file alist.c.

References alist_elt_t::next.

Referenced by alist_clone(), alist_equal(), alist_insert(), alist_is_in(), s_automaton_get_state(), s_automaton_id_to_str(), s_automaton_node_set_accept(), s_automaton_print_edges(), s_automaton_print_nodes(), and s_automaton_successor().

int alist_get_size alist  l  ) 
 

Definition at line 191 of file alist.c.

References alist_t::size.

Referenced by alist_equal().

void alist_insert alist  dst,
alist  src
 

Definition at line 151 of file alist.c.

References alist_add(), alist_elt_get_value(), alist_get_first(), alist_get_next(), and alist_is_in().

Referenced by s_automaton_successor().

int alist_is_empty alist   ) 
 

Returns:
0 or 1

Definition at line 197 of file alist.c.

References alist_t::size.

Referenced by s_automaton_NFA_to_DFA(), s_automaton_PS_to_NFA(), and s_automaton_successor().

int alist_is_in alist  l,
void *  e
 

get first element

Definition at line 124 of file alist.c.

References alist_elt_get_value(), alist_get_first(), and alist_get_next().

Referenced by alist_equal(), alist_insert(), and s_automaton_node_set_accept().

void* alist_pop_first_value alist  l  ) 
 

Definition at line 175 of file alist.c.

References alist_delete_rec(), alist_t::delete_function, alist_elt_t::info, alist_elt_t::next, alist_t::size, and alist_t::start.

Referenced by s_automaton_NFA_to_DFA(), and s_automaton_PS_to_NFA().

void alist_set_delete alist  l,
void(*)(void *)  f
 

funtion to use on data during list deletion.

Definition at line 88 of file alist.c.

References alist_t::delete_function.

Referenced by s_automaton_create().


Generated on Thu Dec 29 02:01:15 2005 for Eliot by  doxygen 1.4.5