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