axiom_navigator.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_NAVIGATOR_H
00019  #define AXIOM_NAVIGATOR_H
00020  
00026 #include <axis2_utils.h>
00027 #include <axis2_env.h>
00028 #include <axiom_node.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00041  typedef struct axiom_navigator axiom_navigator_t;
00042 
00043  typedef struct axiom_navigator_ops axiom_navigator_ops_t;
00044  
00050  struct axiom_navigator_ops 
00051  {
00059      axis2_status_t (AXIS2_CALL *
00060      free)(axiom_navigator_t *om_navigator,
00061            const axis2_env_t *env); 
00062  
00071      axis2_bool_t (AXIS2_CALL *
00072      is_navigable)(axiom_navigator_t *om_navigator,
00073                    const axis2_env_t *env);
00074 
00085      axis2_bool_t (AXIS2_CALL *
00086      is_completed)(axiom_navigator_t *om_navigator,
00087                         const axis2_env_t *env);
00088 
00099      axiom_node_t* (AXIS2_CALL *
00100      next)(axiom_navigator_t *om_navigator, 
00101            const axis2_env_t *env);
00102 
00110      axis2_bool_t (AXIS2_CALL *
00111      visited)(axiom_navigator_t *om_navigator,
00112               const axis2_env_t *env);
00113 
00114  };
00115     
00118 struct axiom_navigator
00119 {
00120     axiom_navigator_ops_t *ops;
00121 };
00122 
00131 AXIS2_EXTERN axiom_navigator_t * AXIS2_CALL
00132 axiom_navigator_create(const axis2_env_t *env,
00133                           axiom_node_t *node);
00134                           
00137 #define AXIOM_NAVIGATOR_FREE(navigator, env) \
00138         ((navigator)->ops->free(navigator, env))
00139 
00140 #define AXIOM_NAVIGATOR_IS_NAVIGABLE(navigator, env) \
00141         ((navigator)->ops->is_navigable(navigator, env))
00142 
00143 #define AXIOM_NAVIGATOR_IS_COMPLETED(navigator, env) \
00144         ((navigator)->ops->is_completed(navigator, env))
00145 
00146 #define AXIOM_NAVIGATOR_VISITED(navigator, env) \
00147         ((navigator)->ops->visited(navigator, env))
00148 
00149 #define AXIOM_NAVIGATOR_NEXT(navigator, env) \
00150         ((navigator)->ops->next(navigator, env))
00151 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 #endif /* AXIOM_NAVIGATOR_H */

Generated on Wed Dec 20 20:14:09 2006 for Axis2/C by  doxygen 1.5.1