Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

xml_schema_enum.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_ENUM_H
00018 #define XML_SCHEMA_ENUM_H
00019 
00025 #include <axis2_allocator.h>
00026 #include <axis2_env.h>
00027 #include <axis2_error.h>
00028 #include <axis2_string.h>
00029 #include <axis2_utils_defines.h>
00030 #include <axis2_array_list.h>
00031 #include <axis2_hash.h>
00032 #include <xml_schema_defines.h>
00033 
00034 #ifdef __cplusplus
00035 extern "C"
00036 {
00037 #endif
00038 
00039 typedef struct xml_schema_enum xml_schema_enum_t;
00040 typedef struct xml_schema_enum_ops xml_schema_enum_ops_t;
00041 
00047 struct xml_schema_enum_ops
00048 {
00049     axis2_status_t (AXIS2_CALL *
00050     free)(
00051             void *schema_enum,
00052             const axis2_env_t *env);
00053 
00054     axis2_hash_t *(AXIS2_CALL *
00055     super_objs)(
00056             void *schema_enum,
00057             const axis2_env_t *env);
00058 
00059     xml_schema_types_t (AXIS2_CALL *
00060     get_type) (
00061             void *schema_enum,
00062             const axis2_env_t *env);
00063 
00064     axis2_char_t* (AXIS2_CALL *
00065     get_value)(
00066             void *schema_enum,
00067             const axis2_env_t *env);
00068 
00069     axis2_status_t (AXIS2_CALL *
00070     set_value)(
00071             void *schema_enum,
00072             const axis2_env_t *env,
00073             const axis2_char_t *value);
00074 
00075     axis2_bool_t (AXIS2_CALL *
00076     equals)(void *schema_enum,
00077             const axis2_env_t *env,
00078             void *obj);
00079 
00080     axis2_array_list_t* (AXIS2_CALL *
00081     get_values)(
00082             void *schema_enum, 
00083             const axis2_env_t *env);
00084     
00085 };
00086 
00087 struct xml_schema_enum
00088 {
00089     xml_schema_enum_ops_t *ops;
00090 };
00091 
00092 AXIS2_EXTERN xml_schema_enum_t * AXIS2_CALL
00093 xml_schema_enum_create(const axis2_env_t *env,
00094                        const axis2_char_t *value);
00095 
00099 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00100 xml_schema_enum_resolve_methods(xml_schema_enum_t *schema_enum,
00101                                       const axis2_env_t *env,
00102                                       xml_schema_enum_t *schema_enum_impl,
00103                                       axis2_hash_t *methods);
00104 
00105 AXIS2_EXTERN int AXIS2_CALL
00106 xml_schema_enum_index(axis2_char_t *value,
00107                             const axis2_env_t *env,
00108                             axis2_array_list_t *values);
00109                             
00110 /***************** macros ****************************************************/                           
00111 
00112 #define XML_SCHEMA_ENUM_FREE(schema_enum, env) \
00113       (((xml_schema_enum_t *) schema_enum)->ops->free (schema_enum, env))
00114 
00115 #define XML_SCHEMA_ENUM_SUPER_OBJS(schema_enum, env) \
00116       (((xml_schema_enum_t *) schema_enum)->ops->super_objs (schema_enum, env))
00117 
00118 #define XML_SCHEMA_ENUM_GET_TYPE(schema_enum, env) \
00119       (((xml_schema_enum_t *) schema_enum)->ops->get_type(schema_enum, env))
00120 
00121 #define XML_SCHEMA_ENUM_GET_VALUE(schema_enum, env) \
00122       (((xml_schema_enum_t *) schema_enum)->ops->get_value \
00123          (schema_enum, env))
00124 
00125 #define XML_SCHEMA_ENUM_SET_VALUE(schema_enum, env, value) \
00126       (((xml_schema_enum_t *) schema_enum)->ops->set_value \
00127          (schema_enum, env, value))
00128 
00129 #define XML_SCHEMA_ENUM_EQUALS(schema_enum, env) \
00130       (((xml_schema_enum_t *) schema_enum)->ops->equals (schema_enum, env))
00131 
00132 #define XML_SCHEMA_ENUM_GET_VALUES(schema_enum, env) \
00133       (((xml_schema_enum_t *) schema_enum)->ops->get_values \
00134          (schema_enum, env))
00135 
00136 /**************** end macros *************************************************/
00138 #ifdef __cplusplus
00139 }
00140 #endif
00141 #endif /* XML_SCHEMA_ENUM_H */

Generated on Fri Jun 16 18:02:32 2006 for Axis2/C by  doxygen 1.4.2