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