Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

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     AXIS2_DECLARE_DATA 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     };
00085     
00086     
00087 struct axiom_children_iterator
00088 {
00089     axiom_children_iterator_ops_t *ops;
00090 };    
00091 
00098 AXIS2_EXTERN  axiom_children_iterator_t * AXIS2_CALL
00099 axiom_children_iterator_create(const axis2_env_t *env, 
00100                                   axiom_node_t *current_child);
00101                                   
00102 /************ Macros *********************************************/
00103 
00104 #define AXIOM_CHILDREN_ITERATOR_FREE(iterator, env) \
00105         ((iterator)->ops->free_fn(iterator, env))
00106 
00107 #define AXIOM_CHILDREN_ITERATOR_REMOVE(iterator, env) \
00108         ((iterator)->ops->remove(iterator, env))
00109         
00110 #define AXIOM_CHILDREN_ITERATOR_HAS_NEXT(iterator, env) \
00111         ((iterator)->ops->has_next(iterator, env))
00112         
00113 #define AXIOM_CHILDREN_ITERATOR_NEXT(iterator, env) \
00114         ((iterator)->ops->next(iterator, env))        
00115               
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121 
00122 
00123 #endif /* AXIOM_CHILDREN_ITERATOR_H */

Generated on Fri Jun 16 18:02:30 2006 for Axis2/C by  doxygen 1.4.2