00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIOM_CHILD_ELEMENT_ITERATOR_H
00019 #define AXIOM_CHILD_ELEMENT_ITERATOR_H
00020
00026 #include <axiom_node.h>
00027 #include <axiom_text.h>
00028
00029
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034
00035 typedef struct axiom_child_element_iterator_ops axiom_child_element_iterator_ops_t;
00036 typedef struct axiom_child_element_iterator axiom_child_element_iterator_t;
00037
00048 struct axiom_child_element_iterator_ops
00049 {
00050 axis2_status_t (AXIS2_CALL *free_fn)
00051 (void *iterator,
00052 const axis2_env_t *env);
00053
00061 axis2_status_t (AXIS2_CALL *
00062 remove)(axiom_child_element_iterator_t *iterator,
00063 const axis2_env_t *env);
00064
00070 axis2_bool_t (AXIS2_CALL *
00071 has_next)(axiom_child_element_iterator_t *iterator,
00072 const axis2_env_t *env);
00073
00078 axiom_node_t* (AXIS2_CALL *
00079 next)(axiom_child_element_iterator_t *iterator,
00080 const axis2_env_t *env);
00081 };
00082
00083
00084 struct axiom_child_element_iterator
00085 {
00086 axiom_child_element_iterator_ops_t *ops;
00087 };
00088
00095 AXIS2_EXTERN axiom_child_element_iterator_t * AXIS2_CALL
00096 axiom_child_element_iterator_create(const axis2_env_t *env,
00097 axiom_node_t *current_child);
00098
00099
00100
00101 #define AXIOM_CHILD_ELEMENT_ITERATOR_FREE(iterator, env) \
00102 (((axiom_child_element_iterator_t *) iterator)->ops->free_fn(iterator, env))
00103
00104 #define AXIOM_CHILD_ELEMENT_ITERATOR_REMOVE(iterator, env) \
00105 ((iterator)->ops->remove(iterator, env))
00106
00107 #define AXIOM_CHILD_ELEMENT_ITERATOR_HAS_NEXT(iterator, env) \
00108 ((iterator)->ops->has_next(iterator, env))
00109
00110 #define AXIOM_CHILD_ELEMENT_ITERATOR_NEXT(iterator, env) \
00111 ((iterator)->ops->next(iterator, env))
00112
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118
00119
00120 #endif