xml_schema_obj.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 XML_SCHEMA_OBJ_H
00019 #define XML_SCHEMA_OBJ_H
00020 
00036 #include <axis2_allocator.h>
00037 #include <axis2_env.h>
00038 #include <axis2_error.h>
00039 #include <axis2_string.h>
00040 #include <axis2_utils_defines.h>
00041 #include <axis2_array_list.h>
00042 #include <axis2_hash.h>
00043 #include <xml_schema_defines.h>
00044 #include <xml_schema_constants.h>
00045 
00046 #ifdef __cplusplus
00047 extern "C"
00048 {
00049 #endif
00050 
00051     /* Type name for struct xml_schema_obj */
00052     typedef struct xml_schema_obj xml_schema_obj_t;
00053     /* Type name for struct xml_schema_obj */
00054     typedef struct xml_schema_obj_ops xml_schema_obj_ops_t;
00055 
00059     struct xml_schema_obj_ops
00060     {
00067         axis2_status_t (AXIS2_CALL *
00068                 free) (
00069                     void *obj,
00070                     const axis2_env_t *env);
00079         axis2_hash_t *(AXIS2_CALL *
00080                 super_objs) (
00081                     void *obj,
00082                     const axis2_env_t *env);
00083 
00094         xml_schema_types_t (AXIS2_CALL *
00095                 get_type) (
00096                     void *obj,
00097                     const axis2_env_t *env);
00098 
00106         int (AXIS2_CALL *
00107                 get_line_num) (
00108                         void *obj,
00109                         const axis2_env_t *env);
00117         axis2_status_t (AXIS2_CALL *
00118                 set_line_num) (
00119                         void *obj,
00120                         const axis2_env_t *env,
00121                         int line_num);
00122 
00130         int (AXIS2_CALL *
00131                 get_line_pos) (
00132                         void *obj,
00133                         const axis2_env_t *env);
00134 
00143         axis2_status_t (AXIS2_CALL *
00144                 set_line_pos) (
00145                         void *obj,
00146                         const axis2_env_t *env,
00147                         int line_pos);
00155         axis2_char_t * (AXIS2_CALL *
00156                 get_source_uri) (
00157                         void *obj,
00158                         const axis2_env_t *env);
00159 
00167         axis2_status_t (AXIS2_CALL *
00168                 set_source_uri) (
00169                         void *obj,
00170                         const axis2_env_t *env,
00171                         axis2_char_t *source_uri);
00172 
00180         axis2_bool_t (AXIS2_CALL *
00181                 equals) (
00182                         void *obj,
00183                         const axis2_env_t *env,
00184                         void *obj_comp);
00185 
00196         axis2_status_t (AXIS2_CALL *
00197                 add_meta_info)(
00198                         void *obj,
00199                         const axis2_env_t *env,
00200                         axis2_char_t *key,
00201                         void *value);
00202 
00210         axis2_hash_t* (AXIS2_CALL *
00211                 get_meta_info)(
00212                         void *obj,
00213                         const axis2_env_t *env);
00214 
00215     };
00216 
00221     struct xml_schema_obj
00222     {
00224         xml_schema_obj_ops_t *ops;
00225     };
00226 
00233     AXIS2_EXTERN xml_schema_obj_t * AXIS2_CALL
00234     xml_schema_obj_create(const axis2_env_t *env);
00235 
00240     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00241     xml_schema_obj_resolve_methods(xml_schema_obj_t *schema_obj,
00242             const axis2_env_t *env,
00243             xml_schema_obj_t *schema_obj_impl,
00244             XML_SCHEMA_SUPER_OBJS_FN super_objs,
00245             XML_SCHEMA_GET_TYPE_FN get_type,
00246             XML_SCHEMA_FREE_FN free_fn);
00247 
00248 
00251 #define XML_SCHEMA_OBJ_FREE(obj, env) \
00252       (((xml_schema_obj_t *) obj)->ops->free (obj, env))
00253 
00256 #define XML_SCHEMA_OBJ_SUPER_OBJS(obj, env) \
00257       (((xml_schema_obj_t *) obj)->ops->super_objs (obj, env))
00258 
00261 #define XML_SCHEMA_OBJ_GET_TYPE(obj, env) \
00262       (((xml_schema_obj_t *) obj)->ops->get_type (obj, env))
00263 
00266 #define XML_SCHEMA_OBJ_GET_LINE_NUM(obj, env) \
00267       (((xml_schema_obj_t *) obj)->ops->get_line_num (obj, env))
00268 
00271 #define XML_SCHEMA_OBJ_SET_LINE_NUM(obj, env, line_num) \
00272       (((xml_schema_obj_t *) obj)->ops->set_line_num (obj, env, line_num))
00273 
00276 #define XML_SCHEMA_OBJ_GET_LINE_POS(obj, env) \
00277       (((xml_schema_obj_t *) obj)->ops->get_line_pos (obj, env))
00278 
00281 #define XML_SCHEMA_OBJ_SET_LINE_POS(obj, env, line_pos) \
00282       (((xml_schema_obj_t *) obj)->ops->set_line_pos (obj, env, line_pos))
00283 
00286 #define XML_SCHEMA_OBJ_GET_SOURCE_URI(obj, env) \
00287       (((xml_schema_obj_t *) obj)->ops->get_source_uri (obj, env))
00288 
00291 #define XML_SCHEMA_OBJ_SET_SOURCE_URI(obj, env, source_uri) \
00292       (((xml_schema_obj_t *) obj)->ops->set_source_uri (obj, env, source_uri))
00293 
00296 #define XML_SCHEMA_OBJ_EQUALS(obj, env) \
00297       (((xml_schema_obj_t *) obj)->ops->equals (obj, env))
00298 
00301 #define XML_SCHEMA_OBJ_GET_META_INFO(obj , env) \
00302     (((xml_schema_obj_t*) obj)->ops->get_meta_info(obj, env))
00303 
00306 #define XML_SCHEMA_OBJ_ADD_META_INFO(obj, env) \
00307     (((xml_schema_obj_t*) obj)->ops->add_meta_info(obj, env))
00308 
00309 #ifdef __cplusplus
00310 }
00311 #endif
00312 #endif /* XML_SCHEMA_OBJ_H */

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