xml_schema_obj.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 XML_SCHEMA_OBJ_H
00018 #define XML_SCHEMA_OBJ_H
00019 
00035 #include <axis2_allocator.h>
00036 #include <axis2_env.h>
00037 #include <axis2_error.h>
00038 #include <axis2_string.h>
00039 #include <axis2_utils_defines.h>
00040 #include <axis2_array_list.h>
00041 #include <axis2_hash.h>
00042 #include <xml_schema_defines.h>
00043 #include <xml_schema_constants.h>
00044 
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049 
00050     /* Type name for struct xml_schema_obj */
00051     typedef struct xml_schema_obj xml_schema_obj_t;
00052     /* Type name for struct xml_schema_obj */
00053     typedef struct xml_schema_obj_ops xml_schema_obj_ops_t;
00054 
00058     struct xml_schema_obj_ops
00059     {
00066         axis2_status_t (AXIS2_CALL *
00067                 free) (
00068                     void *obj,
00069                     const axis2_env_t *env);
00078         axis2_hash_t *(AXIS2_CALL *
00079                 super_objs) (
00080                     void *obj,
00081                     const axis2_env_t *env);
00082 
00093         xml_schema_types_t (AXIS2_CALL *
00094                 get_type) (
00095                     void *obj,
00096                     const axis2_env_t *env);
00097 
00105         int (AXIS2_CALL *
00106                 get_line_num) (
00107                         void *obj,
00108                         const axis2_env_t *env);
00116         axis2_status_t (AXIS2_CALL *
00117                 set_line_num) (
00118                         void *obj,
00119                         const axis2_env_t *env,
00120                         int line_num);
00121 
00129         int (AXIS2_CALL *
00130                 get_line_pos) (
00131                         void *obj,
00132                         const axis2_env_t *env);
00133 
00142         axis2_status_t (AXIS2_CALL *
00143                 set_line_pos) (
00144                         void *obj,
00145                         const axis2_env_t *env,
00146                         int line_pos);
00154         axis2_char_t * (AXIS2_CALL *
00155                 get_source_uri) (
00156                         void *obj,
00157                         const axis2_env_t *env);
00158 
00166         axis2_status_t (AXIS2_CALL *
00167                 set_source_uri) (
00168                         void *obj,
00169                         const axis2_env_t *env,
00170                         axis2_char_t *source_uri);
00171 
00179         axis2_bool_t (AXIS2_CALL *
00180                 equals) (
00181                         void *obj,
00182                         const axis2_env_t *env,
00183                         void *obj_comp);
00184 
00195         axis2_status_t (AXIS2_CALL *
00196                 add_meta_info)(
00197                         void *obj,
00198                         const axis2_env_t *env,
00199                         axis2_char_t *key,
00200                         void *value);
00201 
00209         axis2_hash_t* (AXIS2_CALL *
00210                 get_meta_info)(
00211                         void *obj,
00212                         const axis2_env_t *env);
00213 
00214     };
00215 
00220     struct xml_schema_obj
00221     {
00223         xml_schema_obj_ops_t *ops;
00224     };
00225 
00232     AXIS2_EXTERN xml_schema_obj_t * AXIS2_CALL
00233     xml_schema_obj_create(const axis2_env_t *env);
00234 
00239     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00240     xml_schema_obj_resolve_methods(xml_schema_obj_t *schema_obj,
00241             const axis2_env_t *env,
00242             xml_schema_obj_t *schema_obj_impl,
00243             XML_SCHEMA_SUPER_OBJS_FN super_objs,
00244             XML_SCHEMA_GET_TYPE_FN get_type,
00245             XML_SCHEMA_FREE_FN free_fn);
00246 
00247 
00250 #define XML_SCHEMA_OBJ_FREE(obj, env) \
00251       (((xml_schema_obj_t *) obj)->ops->free (obj, env))
00252 
00255 #define XML_SCHEMA_OBJ_SUPER_OBJS(obj, env) \
00256       (((xml_schema_obj_t *) obj)->ops->super_objs (obj, env))
00257 
00260 #define XML_SCHEMA_OBJ_GET_TYPE(obj, env) \
00261       (((xml_schema_obj_t *) obj)->ops->get_type (obj, env))
00262 
00265 #define XML_SCHEMA_OBJ_GET_LINE_NUM(obj, env) \
00266       (((xml_schema_obj_t *) obj)->ops->get_line_num (obj, env))
00267 
00270 #define XML_SCHEMA_OBJ_SET_LINE_NUM(obj, env, line_num) \
00271       (((xml_schema_obj_t *) obj)->ops->set_line_num (obj, env, line_num))
00272 
00275 #define XML_SCHEMA_OBJ_GET_LINE_POS(obj, env) \
00276       (((xml_schema_obj_t *) obj)->ops->get_line_pos (obj, env))
00277 
00280 #define XML_SCHEMA_OBJ_SET_LINE_POS(obj, env, line_pos) \
00281       (((xml_schema_obj_t *) obj)->ops->set_line_pos (obj, env, line_pos))
00282 
00285 #define XML_SCHEMA_OBJ_GET_SOURCE_URI(obj, env) \
00286       (((xml_schema_obj_t *) obj)->ops->get_source_uri (obj, env))
00287 
00290 #define XML_SCHEMA_OBJ_SET_SOURCE_URI(obj, env, source_uri) \
00291       (((xml_schema_obj_t *) obj)->ops->set_source_uri (obj, env, source_uri))
00292 
00295 #define XML_SCHEMA_OBJ_EQUALS(obj, env) \
00296       (((xml_schema_obj_t *) obj)->ops->equals (obj, env))
00297 
00300 #define XML_SCHEMA_OBJ_GET_META_INFO(obj , env) \
00301     (((xml_schema_obj_t*) obj)->ops->get_meta_info(obj, env))
00302 
00305 #define XML_SCHEMA_OBJ_ADD_META_INFO(obj, env) \
00306     (((xml_schema_obj_t*) obj)->ops->add_meta_info(obj, env))
00307 
00308 #ifdef __cplusplus
00309 }
00310 #endif
00311 #endif /* XML_SCHEMA_OBJ_H */

Generated on Tue Oct 3 18:21:11 2006 for Axis2/C by  doxygen 1.4.7