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

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

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