Classes | |
struct | entry_s |
Typedefs | |
typedef struct entry_s | entry_t |
Functions | |
AXIS2_EXTERN axutil_linked_list_t * | axutil_linked_list_create (const axutil_env_t *env) |
AXIS2_EXTERN void | axutil_linked_list_free (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
AXIS2_EXTERN entry_t * | axutil_linked_list_get_entry (axutil_linked_list_t *linked_list, const axutil_env_t *env, int n) |
AXIS2_EXTERN axis2_status_t | axutil_linked_list_remove_entry (axutil_linked_list_t *linked_list, const axutil_env_t *env, entry_t *e) |
AXIS2_EXTERN axis2_bool_t | axutil_linked_list_check_bounds_inclusive (axutil_linked_list_t *linked_list, const axutil_env_t *env, int index) |
AXIS2_EXTERN axis2_bool_t | axutil_linked_list_check_bounds_exclusive (axutil_linked_list_t *linked_list, const axutil_env_t *env, int index) |
AXIS2_EXTERN void * | axutil_linked_list_get_first (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
AXIS2_EXTERN void * | axutil_linked_list_get_last (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
AXIS2_EXTERN void * | axutil_linked_list_remove_first (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
AXIS2_EXTERN void * | axutil_linked_list_remove_last (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
AXIS2_EXTERN axis2_status_t | axutil_linked_list_add_first (axutil_linked_list_t *linked_list, const axutil_env_t *env, void *o) |
AXIS2_EXTERN axis2_status_t | axutil_linked_list_add_last (axutil_linked_list_t *linked_list, const axutil_env_t *env, void *o) |
AXIS2_EXTERN axis2_bool_t | axutil_linked_list_contains (axutil_linked_list_t *linked_list, const axutil_env_t *env, void *o) |
AXIS2_EXTERN int | axutil_linked_list_size (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
AXIS2_EXTERN axis2_bool_t | axutil_linked_list_add (axutil_linked_list_t *linked_list, const axutil_env_t *env, void *o) |
AXIS2_EXTERN axis2_bool_t | axutil_linked_list_remove (axutil_linked_list_t *linked_list, const axutil_env_t *env, void *o) |
AXIS2_EXTERN axis2_status_t | axutil_linked_list_clear (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
AXIS2_EXTERN void * | axutil_linked_list_get (axutil_linked_list_t *linked_list, const axutil_env_t *env, int index) |
AXIS2_EXTERN void * | axutil_linked_list_set (axutil_linked_list_t *linked_list, const axutil_env_t *env, int index, void *o) |
AXIS2_EXTERN axis2_status_t | axutil_linked_list_add_at_index (axutil_linked_list_t *linked_list, const axutil_env_t *env, int index, void *o) |
AXIS2_EXTERN void * | axutil_linked_list_remove_at_index (axutil_linked_list_t *linked_list, const axutil_env_t *env, int index) |
AXIS2_EXTERN int | axutil_linked_list_index_of (axutil_linked_list_t *linked_list, const axutil_env_t *env, void *o) |
AXIS2_EXTERN int | axutil_linked_list_last_index_of (axutil_linked_list_t *linked_list, const axutil_env_t *env, void *o) |
AXIS2_EXTERN void ** | axutil_linked_list_to_array (axutil_linked_list_t *linked_list, const axutil_env_t *env) |
Variables | |
struct entry_s * | entry_s::next |
struct entry_s * | entry_s::previous |
AXIS2_EXTERN axis2_bool_t axutil_linked_list_add | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
void * | o | |||
) |
Adds an element to the end of the list.
e | the entry to add |
AXIS2_EXTERN axis2_status_t axutil_linked_list_add_at_index | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
int | index, | |||
void * | o | |||
) |
Inserts an element in the given position in the list.
index | where to insert the element | |
o | the element to insert |
AXIS2_EXTERN axis2_status_t axutil_linked_list_add_first | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
void * | o | |||
) |
Insert an element at the first of the list.
o | the element to insert |
AXIS2_EXTERN axis2_status_t axutil_linked_list_add_last | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
void * | o | |||
) |
Insert an element at the last of the list.
o | the element to insert |
AXIS2_EXTERN axis2_bool_t axutil_linked_list_check_bounds_exclusive | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
int | index | |||
) |
Checks that the index is in the range of existing elements (exclusive).
index | the index to check |
AXIS2_EXTERN axis2_bool_t axutil_linked_list_check_bounds_inclusive | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
int | index | |||
) |
Checks that the index is in the range of possible elements (inclusive).
index | the index to check |
AXIS2_EXTERN axis2_status_t axutil_linked_list_clear | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env | |||
) |
Remove all elements from this list.
AXIS2_EXTERN axis2_bool_t axutil_linked_list_contains | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
void * | o | |||
) |
Returns true if the list contains the given object. Comparison is done by o == null ? e = null : o.equals(e)
.
o | the element to look for |
AXIS2_EXTERN axutil_linked_list_t* axutil_linked_list_create | ( | const axutil_env_t * | env | ) |
Create an empty linked list.
AXIS2_EXTERN void* axutil_linked_list_get | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
int | index | |||
) |
Return the element at index.
index | the place to look |
AXIS2_EXTERN entry_t* axutil_linked_list_get_entry | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
int | n | |||
) |
Obtain the Entry at a given position in a list. This method of course takes linear time, but it is intelligent enough to take the shorter of the paths to get to the Entry required. This implies that the first or last entry in the list is obtained in constant time, which is a very desirable property. For speed and flexibility, range checking is not done in this method: Incorrect values will be returned if (n < 0) or (n >= size).
n | the number of the entry to get |
AXIS2_EXTERN void* axutil_linked_list_get_first | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env | |||
) |
Returns the first element in the list.
AXIS2_EXTERN void* axutil_linked_list_get_last | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env | |||
) |
Returns the last element in the list.
AXIS2_EXTERN int axutil_linked_list_index_of | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
void * | o | |||
) |
Returns the first index where the element is located in the list, or -1.
o | the element to look for |
AXIS2_EXTERN int axutil_linked_list_last_index_of | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
void * | o | |||
) |
Returns the last index where the element is located in the list, or -1.
o | the element to look for |
AXIS2_EXTERN axis2_bool_t axutil_linked_list_remove | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
void * | o | |||
) |
Removes the entry at the lowest index in the list that matches the given object, comparing by o == null ? e = null : o.equals(e)
.
o | the object to remove |
AXIS2_EXTERN void* axutil_linked_list_remove_at_index | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
int | index | |||
) |
Removes the element at the given position from the list.
index | the location of the element to remove |
AXIS2_EXTERN axis2_status_t axutil_linked_list_remove_entry | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
entry_t * | e | |||
) |
Remove an entry from the list. This will adjust size and deal with `first' and `last' appropriatly.
e | the entry to remove |
AXIS2_EXTERN void* axutil_linked_list_remove_first | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env | |||
) |
Remove and return the first element in the list.
AXIS2_EXTERN void* axutil_linked_list_remove_last | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env | |||
) |
Remove and return the last element in the list.
AXIS2_EXTERN void* axutil_linked_list_set | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env, | |||
int | index, | |||
void * | o | |||
) |
Replace the element at the given location in the list.
index | which index to change | |
o | the new element |
AXIS2_EXTERN int axutil_linked_list_size | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env | |||
) |
Returns the size of the list.
AXIS2_EXTERN void** axutil_linked_list_to_array | ( | axutil_linked_list_t * | linked_list, | |
const axutil_env_t * | env | |||
) |
Returns an array which contains the elements of the list in order.
struct entry_s* entry_s::next [read, inherited] |
The next list entry, null if this is last.
struct entry_s* entry_s::previous [read, inherited] |
The previous list entry, null if this is first.