00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 axis2_hash_t *methods);
00140
00141 #define XML_SCHEMA_TYPE_FREE(type, env) \
00142 (((xml_schema_type_t *) type)->ops->\
00143 free(type, env))
00144
00145 #define XML_SCHEMA_TYPE_GET_BASE_IMPL(type, env) \
00146 (((xml_schema_type_t *) type)->ops->\
00147 get_base_impl(type, env))
00148
00149 #define XML_SCHEMA_TYPE_GET_TYPE(sch_type, env) \
00150 (((xml_schema_type_t *) sch_type)->ops->\
00151 get_type(sch_type, env))
00152
00153
00154 #define XML_SCHEMA_TYPE_SUPER_OBJS(type, env) \
00155 (((xml_schema_type_t *) type)->ops->\
00156 super_objs(type, env))
00157
00158 #define XML_SCHEMA_TYPE_GET_BASE_SCHEMA_TYPE(type, env) \
00159 (((xml_schema_type_t *) type)->ops->\
00160 get_base_schema_type(type, env))
00161
00162 #define XML_SCHEMA_TYPE_GET_DATA_TYPE(type, env, max_occurs) \
00163 (((xml_schema_type_t *) type)->ops->\
00164 get_data_type(type, env, max_occurs))
00165
00166 #define XML_SCHEMA_TYPE_DERIVE_BY(type, env) \
00167 (((xml_schema_type_t *) type)->ops->\
00168 get_derive_by(type, env))
00169
00170 #define XML_SCHEMA_TYPE_GET_FINAL(type, env) \
00171 (((xml_schema_type_t *) type)->ops->\
00172 get_final(type, env))
00173
00174 #define XML_SCHEMA_TYPE_SET_FINAL(type, env, final_derivation) \
00175 (((xml_schema_type_t *) type)->ops->\
00176 set_final(type, env, final_derivation))
00177
00178 #define XML_SCHEMA_TYPE_GET_FINAL_RESOLVED(type, env) \
00179 (((xml_schema_type_t *) type)->ops->\
00180 get_final_resolved(type, env))
00181
00182 #define XML_SCHEMA_TYPE_IS_MIXED(type, env) \
00183 (((xml_schema_type_t *) type)->ops->\
00184 get_is_mixed(type, env))
00185
00186 #define XML_SCHEMA_TYPE_SET_MIXED(type, env) \
00187 (((xml_schema_type_t *) type)->ops->\
00188 get_set_mixed(type, env))
00189
00190 #define XML_SCHEMA_TYPE_GET_NAME(type, env) \
00191 (((xml_schema_type_t *) type)->ops->\
00192 get_name(type, env))
00193
00194 #define XML_SCHEMA_TYPE_SET_NAME(type, env, name) \
00195 (((xml_schema_type_t *) type)->ops->\
00196 set_name(type, env, name))
00197
00198 #define XML_SCHEMA_TYPE_GET_QNAME(type, env) \
00199 (((xml_schema_type_t *) type)->ops->\
00200 get_qname(type, env))
00201
00203 #ifdef __cplusplus
00204 }
00205 #endif
00206 #endif