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

Generated on Thu Aug 31 17:32:35 2006 for Axis2/C by  doxygen 1.4.6