00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef XML_SCHEMA_FACET_H
00019 #define XML_SCHEMA_FACET_H
00020
00028 #include <xml_schema_annotated.h>
00029 #include <xml_schema_defines.h>
00030 #include <axiom_element.h>
00031 #include <axiom_node.h>
00032 #include <axis2_hash.h>
00033
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042
00043 typedef struct xml_schema_facet
00044 xml_schema_facet_t;
00045 typedef struct xml_schema_facet_ops
00046 xml_schema_facet_ops_t;
00047
00048 struct xml_schema_facet_ops
00049 {
00054 axis2_status_t (AXIS2_CALL *
00055 free) (void *facet,
00056 const axis2_env_t *env);
00057
00058 xml_schema_annotated_t *(AXIS2_CALL *
00059 get_base_impl) (void *facet,
00060 const axis2_env_t *env);
00061
00062 xml_schema_types_t (AXIS2_CALL*
00063 get_type)(void *facet,
00064 const axis2_env_t *env);
00065
00066 axis2_hash_t* (AXIS2_CALL *
00067 super_objs)(void *facet,
00068 const axis2_env_t *env);
00069
00070 axis2_bool_t (AXIS2_CALL *
00071 is_fixed)(void *facet,
00072 const axis2_env_t *env);
00073
00074 axis2_status_t (AXIS2_CALL *
00075 set_fixed)(void *facet,
00076 const axis2_env_t *env,
00077 axis2_bool_t fixed);
00078
00079 axis2_char_t *(AXIS2_CALL *
00080 get_value)(void *facet,
00081 const axis2_env_t *env);
00082
00083 axis2_status_t (AXIS2_CALL *
00084 set_value)(void *facet,
00085 const axis2_env_t *env,
00086 axis2_char_t *value);
00087
00088 axis2_status_t (AXIS2_CALL *
00089 set_facet_type)(void *facet,
00090 const axis2_env_t *env,
00091 int facet_type);
00092
00093 };
00094
00095 struct xml_schema_facet
00096 {
00097 xml_schema_annotated_t base;
00098 xml_schema_facet_ops_t *ops;
00099 };
00100
00104 AXIS2_EXTERN xml_schema_facet_t * AXIS2_CALL
00105 xml_schema_facet_create(const axis2_env_t *env,
00106 axis2_char_t *value,
00107 axis2_bool_t fixed,
00108 xml_schema_types_t type);
00109
00110 AXIS2_EXTERN xml_schema_facet_t * AXIS2_CALL
00111 xml_schema_facet_construct(const axis2_env_t *env,
00112 axiom_node_t *node);
00113
00114
00115
00116 #define XML_SCHEMA_FACET_FREE(facet, env) \
00117 (((xml_schema_facet_t *) facet)->ops->\
00118 free(facet, env))
00119
00120 #define XML_SCHEMA_FACET_GET_BASE_IMPL(facet, env) \
00121 (((xml_schema_facet_t *) facet)->ops->\
00122 get_base_impl(facet, env))
00123
00124 #define XML_SCHEMA_FACET_GET_TYPE(facet, env) \
00125 (((xml_schema_facet_t *) facet)->ops->\
00126 get_type(facet, env))
00127
00128 #define XML_SCHEMA_FACET_SUPER_OBJS(facet, env) \
00129 (((xml_schema_facet_t *) facet)->ops->\
00130 super_objs(facet, env))
00131
00132 #define XML_SCHEMA_FACET_IS_FIXED(facet, env) \
00133 (((xml_schema_facet_t *) facet)->ops->\
00134 is_fixed(facet, env))
00135
00136 #define XML_SCHEMA_FACET_SET_FIXED(facet, env, fixed) \
00137 (((xml_schema_facet_t *) facet)->ops->\
00138 set_fixed(facet, env, fixed))
00139
00140 #define XML_SCHEMA_FACET_GET_VALUE(facet, env) \
00141 (((xml_schema_facet_t *) facet)->ops->\
00142 get_value(facet, env))
00143
00144 #define XML_SCHEMA_FACET_SET_VALUE(facet, env, value) \
00145 (((xml_schema_facet_t *) facet)->ops->\
00146 set_value(facet, env, value))
00147
00148 #define XML_SCHEMA_FACET_SET_FACET_TYPE(facet, env, facet_type) \
00149 (((xml_schema_facet_t *) facet)->ops->\
00150 set_facet_type(facet, env, facet_type))
00151
00152
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 #endif