axiom_child_element_iterator.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
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      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 /************ Macros *********************************************/
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 /* AXIOM_CHILD_ELEMENT_ITERATOR_H */

Generated on Tue Oct 3 20:47:58 2006 for Axis2/C by  doxygen 1.4.7