Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axis2_linked_list_ops_s Struct Reference
[Linked List]

Linked List ops struct. More...

#include <axis2_linked_list.h>

List of all members.

Public Attributes

axis2_status_t(* free )(axis2_linked_list_t *linked_list, const axis2_env_t *env)
entry_t *(* get_entry )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int n)
axis2_status_t(* remove_entry )(axis2_linked_list_t *linked_list, const axis2_env_t *env, entry_t *e)
axis2_bool_t(* check_bounds_inclusive )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
axis2_bool_t(* check_bounds_exclusive )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
void *(* get_first )(axis2_linked_list_t *linked_list, const axis2_env_t *env)
void *(* get_last )(axis2_linked_list_t *linked_list, const axis2_env_t *env)
void *(* remove_first )(axis2_linked_list_t *linked_list, const axis2_env_t *env)
void *(* remove_last )(axis2_linked_list_t *linked_list, const axis2_env_t *env)
axis2_status_t(* add_first )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
axis2_status_t(* add_last )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
axis2_bool_t(* contains )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
int(* size )(axis2_linked_list_t *linked_list, const axis2_env_t *env)
axis2_bool_t(* add )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
axis2_bool_t(* remove )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
axis2_status_t(* clear )(axis2_linked_list_t *linked_list, const axis2_env_t *env)
void *(* get )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
void *(* set )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o)
axis2_status_t(* add_at_index )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o)
void *(* remove_at_index )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
int(* index_of )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
int(* last_index_of )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
void **(* to_array )(axis2_linked_list_t *linked_list, const axis2_env_t *env)


Detailed Description

Linked List ops struct.


Member Data Documentation

axis2_bool_t( * axis2_linked_list_ops_s::add)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
 

Adds an element to the end of the list.

Parameters:
e the entry to add
Returns:
true, as it always succeeds

axis2_status_t( * axis2_linked_list_ops_s::add_at_index)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o)
 

Inserts an element in the given position in the list.

Parameters:
index where to insert the element
o the element to insert

axis2_status_t( * axis2_linked_list_ops_s::add_first)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
 

Insert an element at the first of the list.

Parameters:
o the element to insert

axis2_status_t( * axis2_linked_list_ops_s::add_last)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
 

Insert an element at the last of the list.

Parameters:
o the element to insert

axis2_bool_t( * axis2_linked_list_ops_s::check_bounds_exclusive)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
 

Checks that the index is in the range of existing elements (exclusive).

Parameters:
index the index to check

axis2_bool_t( * axis2_linked_list_ops_s::check_bounds_inclusive)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
 

Checks that the index is in the range of possible elements (inclusive).

Parameters:
index the index to check

axis2_status_t( * axis2_linked_list_ops_s::clear)(axis2_linked_list_t *linked_list, const axis2_env_t *env)
 

Remove all elements from this list.

axis2_bool_t( * axis2_linked_list_ops_s::contains)(axis2_linked_list_t *linked_list, const axis2_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).

Parameters:
o the element to look for
Returns:
true if it is found

void*( * axis2_linked_list_ops_s::get)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
 

Return the element at index.

Parameters:
index the place to look
Returns:
the element at index

entry_t*( * axis2_linked_list_ops_s::get_entry)(axis2_linked_list_t *linked_list, const axis2_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).

Parameters:
n the number of the entry to get
Returns:
the entry at position n

void*( * axis2_linked_list_ops_s::get_first)(axis2_linked_list_t *linked_list, const axis2_env_t *env)
 

Returns the first element in the list.

Returns:
the first list element

void*( * axis2_linked_list_ops_s::get_last)(axis2_linked_list_t *linked_list, const axis2_env_t *env)
 

Returns the last element in the list.

Returns:
the last list element

int( * axis2_linked_list_ops_s::index_of)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
 

Returns the first index where the element is located in the list, or -1.

Parameters:
o the element to look for
Returns:
its position, or -1 if not found

int( * axis2_linked_list_ops_s::last_index_of)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o)
 

Returns the last index where the element is located in the list, or -1.

Parameters:
o the element to look for
Returns:
its position, or -1 if not found

axis2_bool_t( * axis2_linked_list_ops_s::remove)(axis2_linked_list_t *linked_list, const axis2_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).

Parameters:
o the object to remove
Returns:
true if an instance of the object was removed

void*( * axis2_linked_list_ops_s::remove_at_index)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index)
 

Removes the element at the given position from the list.

Parameters:
index the location of the element to remove
Returns:
the removed element

axis2_status_t( * axis2_linked_list_ops_s::remove_entry)(axis2_linked_list_t *linked_list, const axis2_env_t *env, entry_t *e)
 

Remove an entry from the list. This will adjust size and deal with `first' and `last' appropriatly.

Parameters:
e the entry to remove

void*( * axis2_linked_list_ops_s::remove_first)(axis2_linked_list_t *linked_list, const axis2_env_t *env)
 

Remove and return the first element in the list.

Returns:
the former first element in the list

void*( * axis2_linked_list_ops_s::remove_last)(axis2_linked_list_t *linked_list, const axis2_env_t *env)
 

Remove and return the last element in the list.

Returns:
the former last element in the list

void*( * axis2_linked_list_ops_s::set)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o)
 

Replace the element at the given location in the list.

Parameters:
index which index to change
o the new element
Returns:
the prior element

int( * axis2_linked_list_ops_s::size)(axis2_linked_list_t *linked_list, const axis2_env_t *env)
 

Returns the size of the list.

Returns:
the list size

void**( * axis2_linked_list_ops_s::to_array)(axis2_linked_list_t *linked_list, const axis2_env_t *env)
 

Returns an array which contains the elements of the list in order.

Returns:
an array containing the list elements


The documentation for this struct was generated from the following file:
Generated on Fri Jun 16 18:02:41 2006 for Axis2/C by  doxygen 1.4.2