axiom_children_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_CHILDREN_ITERATOR_H
00018  #define AXIOM_CHILDREN_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_children_iterator_ops axiom_children_iterator_ops_t;
00035 typedef struct axiom_children_iterator axiom_children_iterator_t;
00036 
00047      struct axiom_children_iterator_ops
00048     {
00052         axis2_status_t (AXIS2_CALL *
00053       free_fn)(axiom_children_iterator_t *iterator,
00054                  const axis2_env_t *env);
00055                              
00063         axis2_status_t (AXIS2_CALL *
00064       remove)(axiom_children_iterator_t *iterator,
00065                 const axis2_env_t *env);
00066                              
00073         axis2_bool_t (AXIS2_CALL *
00074       has_next)(axiom_children_iterator_t *iterator,
00075                   const axis2_env_t *env);
00076     
00081         axiom_node_t* (AXIS2_CALL *
00082       next)(axiom_children_iterator_t *iterator,
00083               const axis2_env_t *env);
00084 
00091         axis2_status_t (AXIS2_CALL *
00092         reset)(axiom_children_iterator_t *iterator,
00093                           const axis2_env_t *env);
00094     };
00095     
00096     
00097 struct axiom_children_iterator
00098 {
00099     axiom_children_iterator_ops_t *ops;
00100 };    
00101 
00108 AXIS2_EXTERN  axiom_children_iterator_t * AXIS2_CALL
00109 axiom_children_iterator_create(const axis2_env_t *env, 
00110                                   axiom_node_t *current_child);
00111                                   
00112 /************ Macros *********************************************/
00113 
00114 #define AXIOM_CHILDREN_ITERATOR_FREE(iterator, env) \
00115         ((iterator)->ops->free_fn(iterator, env))
00116 
00117 #define AXIOM_CHILDREN_ITERATOR_REMOVE(iterator, env) \
00118         ((iterator)->ops->remove(iterator, env))
00119         
00120 #define AXIOM_CHILDREN_ITERATOR_HAS_NEXT(iterator, env) \
00121         ((iterator)->ops->has_next(iterator, env))
00122         
00123 #define AXIOM_CHILDREN_ITERATOR_NEXT(iterator, env) \
00124         ((iterator)->ops->next(iterator, env))        
00125               
00126 #define AXIOM_CHILDREN_ITERATOR_RESET(iterator, env) \
00127         ((iterator)->ops->reset(iterator, env))        
00128 
00130 #ifdef __cplusplus
00131 }
00132 #endif
00133 
00134 
00135 #endif /* AXIOM_CHILDREN_ITERATOR_H */

Generated on Tue Oct 3 18:21:09 2006 for Axis2/C by  doxygen 1.4.7