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

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  
00032 #include <axis2_utils.h>
00033 #include <axis2_env.h>
00034 #include <axiom_node.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040 
00047  typedef struct axiom_navigator axiom_navigator_t;
00048 
00049  typedef struct axiom_navigator_ops axiom_navigator_ops_t;
00050  
00056  struct axiom_navigator_ops 
00057  {
00065      axis2_status_t (AXIS2_CALL *
00066      free)(axiom_navigator_t *om_navigator,
00067            const axis2_env_t *env); 
00068  
00077      axis2_bool_t (AXIS2_CALL *
00078      is_navigable)(axiom_navigator_t *om_navigator,
00079                    const axis2_env_t *env);
00080 
00091      axis2_bool_t (AXIS2_CALL *
00092      is_completed)(axiom_navigator_t *om_navigator,
00093                         const axis2_env_t *env);
00094 
00105      axiom_node_t* (AXIS2_CALL *
00106      next)(axiom_navigator_t *om_navigator, 
00107            const axis2_env_t *env);
00108 
00116      axis2_bool_t (AXIS2_CALL *
00117      visited)(axiom_navigator_t *om_navigator,
00118               const axis2_env_t *env);
00119 
00120  };
00121     
00124 struct axiom_navigator
00125 {
00126     axiom_navigator_ops_t *ops;
00127 };
00128 
00137 AXIS2_EXTERN axiom_navigator_t * AXIS2_CALL
00138 axiom_navigator_create(const axis2_env_t *env,
00139                           axiom_node_t *node);
00140                           
00143 #define AXIOM_NAVIGATOR_FREE(navigator, env) \
00144         ((navigator)->ops->free(navigator, env))
00145 
00146 #define AXIOM_NAVIGATOR_IS_NAVIGABLE(navigator, env) \
00147         ((navigator)->ops->is_navigable(navigator, env))
00148 
00149 #define AXIOM_NAVIGATOR_IS_COMPLETED(navigator, env) \
00150         ((navigator)->ops->is_completed(navigator, env))
00151 
00152 #define AXIOM_NAVIGATOR_VISITED(navigator, env) \
00153         ((navigator)->ops->visited(navigator, env))
00154 
00155 #define AXIOM_NAVIGATOR_NEXT(navigator, env) \
00156         ((navigator)->ops->next(navigator, env))
00157 
00160 #ifdef __cplusplus
00161 }
00162 #endif
00163 
00164 #endif /* AXIOM_NAVIGATOR_H */

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