axiom_stax_builder.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_STAX_BUILDER_H
00019 #define AXIOM_STAX_BUILDER_H
00020 
00026 #include <axiom_node.h>
00027 #include <axiom_xml_reader.h>
00028 #include <axiom_document.h>
00029 #include <axis2_env.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00036 
00037     struct axiom_stax_builder;
00038     struct axiom_stax_builder_ops;
00039 
00050      typedef struct axiom_stax_builder_ops
00051     {
00060         axiom_node_t*(AXIS2_CALL *
00061       next) (struct axiom_stax_builder *builder,
00062                const axis2_env_t *env);
00063 
00070         axis2_status_t (AXIS2_CALL *
00071       discard_current_element)(struct axiom_stax_builder *builder,
00072                                  const axis2_env_t *env);
00081       axis2_status_t (AXIS2_CALL *
00082       free)(struct axiom_stax_builder *builder,
00083             const axis2_env_t *env);
00084         
00092         axiom_document_t* (AXIS2_CALL *
00093       get_document)(struct axiom_stax_builder *builder,
00094                       const axis2_env_t *env);
00099         axis2_bool_t (AXIS2_CALL *
00100       is_complete)(struct axiom_stax_builder* builder,
00101                      const axis2_env_t *env);
00106         int (AXIS2_CALL *
00107       next_with_token)(struct axiom_stax_builder *builder,
00108                          const axis2_env_t *env);                                                                                                                                                                                                                                                 
00109                                                         
00110     } axiom_stax_builder_ops_t;
00111 
00116     typedef struct axiom_stax_builder
00117     {
00119         axiom_stax_builder_ops_t *ops;
00120        
00121     }axiom_stax_builder_t;
00122 
00128     AXIS2_EXTERN axiom_stax_builder_t * AXIS2_CALL
00129     axiom_stax_builder_create(const axis2_env_t *env,
00130                                  axiom_xml_reader_t *parser);
00131 
00132 
00134 #define AXIOM_STAX_BUILDER_NEXT(builder,env) \
00135         ((builder)->ops->next(builder, env))
00136 
00137 #define AXIOM_STAX_BUILDER_DISCARD_CURRENT_ELEMENT(builder,env) \
00138         ((builder)->ops->discard_current_element(builder, env))
00139 
00140 #define AXIOM_STAX_BUILDER_FREE(builder,env) \
00141         ((builder)->ops->free(builder,env))
00142 
00144 #define AXIOM_STAX_BUILDER_GET_DOCUMENT(builder,env) \
00145         ((builder)->ops->get_document(builder,env))
00146 
00147 #define AXIOM_STAX_BUILDER_IS_COMPLETE(builder, env) \
00148         ((builder)->ops->is_complete(builder, env))                       
00149 
00150 #define AXIOM_STAX_BUILDER_NEXT_WITH_TOKEN(builder, env) \
00151         ((builder)->ops->next_with_token(builder, env))                    
00152 
00156 #ifdef __cplusplus
00157 }
00158 #endif
00159 
00160 
00161 #endif                          /* AXIOM_STAX_BUILDER_H */

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