axiom_children_iterator.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017  
00018  #ifndef AXIOM_CHILDREN_ITERATOR_H
00019  #define AXIOM_CHILDREN_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_children_iterator_ops axiom_children_iterator_ops_t;
00036 typedef struct axiom_children_iterator axiom_children_iterator_t;
00037 
00048      struct axiom_children_iterator_ops
00049     {
00053         axis2_status_t (AXIS2_CALL *
00054       free_fn)(axiom_children_iterator_t *iterator,
00055                  const axis2_env_t *env);
00056                              
00064         axis2_status_t (AXIS2_CALL *
00065       remove)(axiom_children_iterator_t *iterator,
00066                 const axis2_env_t *env);
00067                              
00074         axis2_bool_t (AXIS2_CALL *
00075       has_next)(axiom_children_iterator_t *iterator,
00076                   const axis2_env_t *env);
00077     
00082         axiom_node_t* (AXIS2_CALL *
00083       next)(axiom_children_iterator_t *iterator,
00084               const axis2_env_t *env);
00085 
00092         axis2_status_t (AXIS2_CALL *
00093         reset)(axiom_children_iterator_t *iterator,
00094                           const axis2_env_t *env);
00095     };
00096     
00097     
00098 struct axiom_children_iterator
00099 {
00100     axiom_children_iterator_ops_t *ops;
00101 };    
00102 
00109 AXIS2_EXTERN  axiom_children_iterator_t * AXIS2_CALL
00110 axiom_children_iterator_create(const axis2_env_t *env, 
00111                                   axiom_node_t *current_child);
00112                                   
00113 /************ Macros *********************************************/
00114 
00115 #define AXIOM_CHILDREN_ITERATOR_FREE(iterator, env) \
00116         ((iterator)->ops->free_fn(iterator, env))
00117 
00118 #define AXIOM_CHILDREN_ITERATOR_REMOVE(iterator, env) \
00119         ((iterator)->ops->remove(iterator, env))
00120         
00121 #define AXIOM_CHILDREN_ITERATOR_HAS_NEXT(iterator, env) \
00122         ((iterator)->ops->has_next(iterator, env))
00123         
00124 #define AXIOM_CHILDREN_ITERATOR_NEXT(iterator, env) \
00125         ((iterator)->ops->next(iterator, env))        
00126               
00127 #define AXIOM_CHILDREN_ITERATOR_RESET(iterator, env) \
00128         ((iterator)->ops->reset(iterator, env))        
00129 
00131 #ifdef __cplusplus
00132 }
00133 #endif
00134 
00135 
00136 #endif /* AXIOM_CHILDREN_ITERATOR_H */

Generated on Wed Dec 20 20:34:49 2006 for Axis2/C by  doxygen 1.5.1