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