xml_schema_type.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_TYPE_H
00018 #define XML_SCHEMA_TYPE_H
00019 
00026 #include <xml_schema_annotated.h>
00027 #include <axis2_hash.h>
00028 #include <axis2_qname.h>
00029 
00035 typedef struct xml_schema_type xml_schema_type_t;
00036 typedef struct xml_schema_type_ops xml_schema_type_ops_t;
00037 struct xml_schema_data_type;
00038 struct xml_schema_derivation_method;
00039 struct xml_schema;
00040 
00041 #ifdef __cplusplus
00042 extern "C"
00043 {
00044 #endif
00045 
00046 struct xml_schema_type_ops
00047 {
00048     axis2_status_t (AXIS2_CALL *
00049     free) (void *type,
00050             const axis2_env_t *env);
00051 
00052     xml_schema_annotated_t *(AXIS2_CALL *
00053     get_base_impl) (void *type,
00054                     const axis2_env_t *env);
00055                     
00056     axis2_hash_t* (AXIS2_CALL *
00057     super_objs)(void *type,
00058                 const axis2_env_t *env);
00059                    
00060     xml_schema_types_t (AXIS2_CALL *
00061     get_type)(void *type,
00062           const axis2_env_t *env);                                                  
00063 
00064     void *(AXIS2_CALL *
00065     get_base_schema_type) (void *type,
00066                             const axis2_env_t *env);
00067 
00068     struct xml_schema_data_type *(AXIS2_CALL *
00069     get_data_type) (void *type,
00070                     const axis2_env_t *env);
00071 
00072     struct xml_schema_derivation_method *(AXIS2_CALL *
00073     get_derive_by) (void *type,
00074                             const axis2_env_t *env);
00075 
00076     struct xml_schema_derivation_method *(AXIS2_CALL *
00077     get_final) (void *type,
00078                         const axis2_env_t *env);
00079 
00080     axis2_status_t (AXIS2_CALL *
00081     set_final) (void *type,
00082                 const axis2_env_t *env,
00083                 struct xml_schema_derivation_method *final_derivation);
00084 
00085     struct xml_schema_derivation_method *(AXIS2_CALL *
00086     get_final_resolved) (void *type,
00087                         const axis2_env_t *env);
00088 
00089     axis2_bool_t (AXIS2_CALL *
00090     is_mixed) (void *type,
00091                         const axis2_env_t *env);
00092 
00093     axis2_status_t (AXIS2_CALL *
00094     set_mixed) (void *type,
00095                         const axis2_env_t *env,
00096                         axis2_bool_t is_mixed); 
00097 
00098     axis2_char_t *(AXIS2_CALL *
00099     get_name) (void *type,
00100                         const axis2_env_t *env); 
00101 
00102     axis2_status_t (AXIS2_CALL *
00103     set_name) (void *type,
00104                         const axis2_env_t *env,
00105                         axis2_char_t *name); 
00106 
00107     axis2_qname_t *(AXIS2_CALL *
00108     get_qname) (void *type,
00109                         const axis2_env_t *env);
00110 
00111 };
00112 
00113 struct xml_schema_type
00114 {
00115     xml_schema_annotated_t base;
00116     xml_schema_type_ops_t *ops;
00117 };
00118 
00127 AXIS2_EXTERN xml_schema_type_t * AXIS2_CALL
00128 xml_schema_type_create(const axis2_env_t *env,
00129                                 struct xml_schema *schema);
00130 
00134 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00135 xml_schema_type_resolve_methods(
00136                                 xml_schema_type_t *type,
00137                                 const axis2_env_t *env,
00138                                 xml_schema_type_t *type_impl,
00139                                 XML_SCHEMA_SUPER_OBJS_FN super_objs,
00140                                 XML_SCHEMA_GET_TYPE_FN get_type,
00141                                 XML_SCHEMA_FREE_FN free_fn);
00142 
00143 #define XML_SCHEMA_TYPE_FREE(type, env) \
00144       (((xml_schema_type_t *) type)->ops->\
00145             free(type, env))
00146 
00147 #define XML_SCHEMA_TYPE_GET_BASE_IMPL(type, env) \
00148       (((xml_schema_type_t *) type)->ops->\
00149             get_base_impl(type, env))
00150 
00151 #define XML_SCHEMA_TYPE_GET_TYPE(sch_type, env) \
00152       (((xml_schema_type_t *) sch_type)->ops->\
00153            get_type(sch_type, env))
00154 
00155            
00156 #define XML_SCHEMA_TYPE_SUPER_OBJS(type, env) \
00157       (((xml_schema_type_t *) type)->ops->\
00158            super_objs(type, env))                       
00159 
00160 #define XML_SCHEMA_TYPE_GET_BASE_SCHEMA_TYPE(type, env) \
00161       (((xml_schema_type_t *) type)->ops->\
00162             get_base_schema_type(type, env))
00163 
00164 #define XML_SCHEMA_TYPE_GET_DATA_TYPE(type, env, max_occurs) \
00165       (((xml_schema_type_t *) type)->ops->\
00166             get_data_type(type, env, max_occurs))
00167 
00168 #define XML_SCHEMA_TYPE_DERIVE_BY(type, env) \
00169       (((xml_schema_type_t *) type)->ops->\
00170             get_derive_by(type, env))
00171 
00172 #define XML_SCHEMA_TYPE_GET_FINAL(type, env) \
00173       (((xml_schema_type_t *) type)->ops->\
00174             get_final(type, env))
00175 
00176 #define XML_SCHEMA_TYPE_SET_FINAL(type, env, final_derivation) \
00177         (((xml_schema_type_t *) type)->ops->\
00178             set_final(type, env, final_derivation)) 
00179             
00180 #define XML_SCHEMA_TYPE_GET_FINAL_RESOLVED(type, env) \
00181         (((xml_schema_type_t *) type)->ops->\
00182             get_final_resolved(type, env))
00183             
00184 #define XML_SCHEMA_TYPE_IS_MIXED(type, env) \
00185         (((xml_schema_type_t *) type)->ops->\
00186             get_is_mixed(type, env))   
00187             
00188 #define XML_SCHEMA_TYPE_SET_MIXED(type, env) \
00189         (((xml_schema_type_t *) type)->ops->\
00190             get_set_mixed(type, env))  
00191             
00192 #define XML_SCHEMA_TYPE_GET_NAME(type, env) \
00193         (((xml_schema_type_t *) type)->ops->\
00194             get_name(type, env))    
00195 
00196 #define XML_SCHEMA_TYPE_SET_NAME(type, env, name) \
00197         (((xml_schema_type_t *) type)->ops->\
00198             set_name(type, env, name)) 
00199             
00200 #define XML_SCHEMA_TYPE_GET_QNAME(type, env) \
00201         (((xml_schema_type_t *) type)->ops->\
00202             get_qname(type, env))    
00203                                                            
00205 #ifdef __cplusplus
00206 }
00207 #endif
00208 #endif /* XML_SCHEMA_TYPE_H */

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