- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# axutil_linked_list.h

Go to the documentation of this file.

    00001
    00002 /*
    00003  * Licensed to the Apache Software Foundation (ASF) under one or more
    00004  * contributor license agreements.  See the NOTICE file distributed with
    00005  * this work for additional information regarding copyright ownership.
    00006  * The ASF licenses this file to You under the Apache License, Version 2.0
    00007  * (the "License"); you may not use this file except in compliance with
    00008  * the License.  You may obtain a copy of the License at
    00009  *
    00010  *      http://www.apache.org/licenses/LICENSE-2.0
    00011  *
    00012  * Unless required by applicable law or agreed to in writing, software
    00013  * distributed under the License is distributed on an "AS IS" BASIS,
    00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00015  * See the License for the specific language governing permissions and
    00016  * limitations under the License.
    00017  */
    00018
    00019 #ifndef AXUTIL_LINKED_LIST_H
    00020 #define AXUTIL_LINKED_LIST_H
    00021
    00027 #include <axutil_utils_defines.h>
    00028 #include <axutil_env.h>
    00029
    00030 #ifdef __cplusplus
    00031 extern "C"
    00032 {
    00033 #endif
    00034
    00035     typedef struct axutil_linked_list axutil_linked_list_t;
    00036
    00046     typedef struct entry_s
    00047     {
    00048
    00050         void *data;
    00051
    00053         struct entry_s *next;
    00054
    00056         struct entry_s *previous;
    00057
    00058     }
    00059     entry_t;                /* struct entry */
    00060
    00064     AXIS2_EXTERN axutil_linked_list_t *AXIS2_CALL
    00065     axutil_linked_list_create(
    00066         const axutil_env_t * env);
    00067
    00068     AXIS2_EXTERN void AXIS2_CALL
    00069     axutil_linked_list_free(
    00070         axutil_linked_list_t * linked_list,
    00071         const axutil_env_t * env);
    00072
    00085     AXIS2_EXTERN entry_t *AXIS2_CALL
    00086     axutil_linked_list_get_entry(
    00087         axutil_linked_list_t * linked_list,
    00088         const axutil_env_t * env,
    00089         int n);
    00090
    00097     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00098     axutil_linked_list_remove_entry(
    00099         axutil_linked_list_t * linked_list,
    00100         const axutil_env_t * env,
    00101         entry_t * e);
    00102
    00108     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00109
    00110     axutil_linked_list_check_bounds_inclusive(
    00111         axutil_linked_list_t * linked_list,
    00112         const axutil_env_t * env,
    00113         int index);
    00114
    00120     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00121
    00122     axutil_linked_list_check_bounds_exclusive(
    00123         axutil_linked_list_t * linked_list,
    00124         const axutil_env_t * env,
    00125         int index);
    00126
    00132     AXIS2_EXTERN void *AXIS2_CALL
    00133     axutil_linked_list_get_first(
    00134         axutil_linked_list_t * linked_list,
    00135         const axutil_env_t * env);
    00136
    00142     AXIS2_EXTERN void *AXIS2_CALL
    00143     axutil_linked_list_get_last(
    00144         axutil_linked_list_t * linked_list,
    00145         const axutil_env_t * env);
    00146
    00152     AXIS2_EXTERN void *AXIS2_CALL
    00153     axutil_linked_list_remove_first(
    00154         axutil_linked_list_t * linked_list,
    00155         const axutil_env_t * env);
    00156
    00162     AXIS2_EXTERN void *AXIS2_CALL
    00163     axutil_linked_list_remove_last(
    00164         axutil_linked_list_t * linked_list,
    00165         const axutil_env_t * env);
    00166
    00172     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00173     axutil_linked_list_add_first(
    00174         axutil_linked_list_t * linked_list,
    00175         const axutil_env_t * env,
    00176         void *o);
    00177
    00183     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00184     axutil_linked_list_add_last(
    00185         axutil_linked_list_t * linked_list,
    00186         const axutil_env_t * env,
    00187         void *o);
    00188
    00196     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00197     axutil_linked_list_contains(
    00198         axutil_linked_list_t * linked_list,
    00199         const axutil_env_t * env,
    00200         void *o);
    00201
    00207     AXIS2_EXTERN int AXIS2_CALL
    00208     axutil_linked_list_size(
    00209         axutil_linked_list_t * linked_list,
    00210         const axutil_env_t * env);
    00211
    00218     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00219     axutil_linked_list_add(
    00220         axutil_linked_list_t * linked_list,
    00221         const axutil_env_t * env,
    00222         void *o);
    00223
    00231     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00232     axutil_linked_list_remove(
    00233         axutil_linked_list_t * linked_list,
    00234         const axutil_env_t * env,
    00235         void *o);
    00236
    00240     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00241     axutil_linked_list_clear(
    00242         axutil_linked_list_t * linked_list,
    00243         const axutil_env_t * env);
    00244
    00251     AXIS2_EXTERN void *AXIS2_CALL
    00252     axutil_linked_list_get(
    00253         axutil_linked_list_t * linked_list,
    00254         const axutil_env_t * env,
    00255         int index);
    00256
    00264     AXIS2_EXTERN void *AXIS2_CALL
    00265     axutil_linked_list_set(
    00266         axutil_linked_list_t * linked_list,
    00267         const axutil_env_t * env,
    00268         int index,
    00269         void *o);
    00270
    00277     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00278     axutil_linked_list_add_at_index(
    00279         axutil_linked_list_t * linked_list,
    00280         const axutil_env_t * env,
    00281         int index,
    00282         void *o);
    00283
    00290     AXIS2_EXTERN void *AXIS2_CALL
    00291     axutil_linked_list_remove_at_index(
    00292         axutil_linked_list_t * linked_list,
    00293         const axutil_env_t * env,
    00294         int index);
    00295
    00302     AXIS2_EXTERN int AXIS2_CALL
    00303     axutil_linked_list_index_of(
    00304         axutil_linked_list_t * linked_list,
    00305         const axutil_env_t * env,
    00306         void *o);
    00307
    00314     AXIS2_EXTERN int AXIS2_CALL
    00315     axutil_linked_list_last_index_of(
    00316         axutil_linked_list_t * linked_list,
    00317         const axutil_env_t * env,
    00318         void *o);
    00319
    00325     AXIS2_EXTERN void **AXIS2_CALL
    00326     axutil_linked_list_to_array(
    00327         axutil_linked_list_t * linked_list,
    00328         const axutil_env_t * env);
    00329
    00330 #ifdef __cplusplus
    00331 }
    00332 #endif
    00333
    00334 #endif                          /* AXIS2_LINKED_LIST_H */