axiom_child_element_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_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 /************ Macros *********************************************/
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 /* AXIOM_CHILD_ELEMENT_ITERATOR_H */

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