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

axis2_om_document.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 AXIS2_OM_DOCUMENT_H
00018 #define AXIS2_OM_DOCUMENT_H
00019 
00020 #include <axis2_env.h>
00021 #include <axis2_om_node.h>
00022 #include <axis2_defines.h>
00023 
00024 #ifdef __cplusplus
00025 extern "C"
00026 {
00027 #endif
00028 
00029 
00035 #define CHAR_SET_ENCODING "UTF-8"
00036 #define XML_VERSION     "1.0"
00037 
00038     struct axis2_om_document;
00039     struct axis2_om_document_ops;
00040     struct axis2_om_stax_builder;
00041 
00052  AXIS2_DECLARE_DATA   typedef struct axis2_om_document_ops
00053     {
00054 
00061         axis2_status_t (AXIS2_CALL *free) (struct axis2_om_document *document,
00062                                            axis2_env_t **env);
00063 
00070         axis2_om_node_t* (AXIS2_CALL *build_next) (struct axis2_om_document *document,
00071                                                    axis2_env_t **env);
00072 
00081         axis2_status_t (AXIS2_CALL *add_child)(struct axis2_om_document * document,
00082                                                axis2_env_t **env,
00083                                                axis2_om_node_t * child);
00084 
00092         axis2_om_node_t* (AXIS2_CALL *get_root_element)(struct axis2_om_document *document,
00093                                                         axis2_env_t **env);
00094 
00103         axis2_status_t (AXIS2_CALL *set_root_element)(struct axis2_om_document *document,
00104                                                        axis2_env_t **env,
00105                                                        axis2_om_node_t *om_node);
00112         axis2_om_node_t* (AXIS2_CALL *build_all)(struct axis2_om_document *document,
00113                                                 axis2_env_t **env);            
00114     } axis2_om_document_ops_t;
00115 
00120     typedef struct axis2_om_document
00121     {
00123         axis2_om_document_ops_t *ops;
00124       
00125     } axis2_om_document_t;
00126 
00134     AXIS2_DECLARE(axis2_om_document_t *)
00135     axis2_om_document_create (axis2_env_t **env,
00136                               axis2_om_node_t * root,
00137                               struct axis2_om_stax_builder *builder);
00138 
00140 #define AXIS2_OM_DOCUMENT_FREE(document,env) \
00141         ((document)->ops->free(document,env))
00142         
00144 #define AXIS2_OM_DOCUMENT_ADD_CHILD(document,env, child) \
00145         ((document)->ops->add_child(document,env,child))
00146         
00148 #define AXIS2_OM_DOCUMENT_BUILD_NEXT(document,env) \
00149         ((document)->ops->build_next(document,env))
00150         
00152 #define AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(document,env) \
00153         ((document)->ops->get_root_element(document,env))
00155 #define AXIS2_OM_DOCUMENT_SET_ROOT_ELEMENT(document,env,om_node) \
00156         ((document)->ops->set_root_element(document,env,om_node))
00157                
00159 #define AXIS2_OM_DOCUMENT_BUILD_ALL(document,env) \
00160         ((document)->ops->build_all(document,env))
00161 
00164 #ifdef __cplusplus
00165 }
00166 #endif
00167 
00168 #endif                          /* AXIS2_OM_DOCUMENT_H */

Generated on Wed Dec 7 07:58:24 2005 for Axis2/C by  doxygen 1.4.2