xml_schema_form.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef XML_SCHEMA_FORM_H
00019 #define XML_SCHEMA_FORM_H
00020 
00029 #include <xml_schema_defines.h>
00030 #include <xml_schema_enum.h>
00031 
00037 typedef struct xml_schema_form xml_schema_form_t;
00038 typedef struct xml_schema_form_ops xml_schema_form_ops_t;
00039 
00040 #define XML_SCHEMA_FORM_QUALIFIED "qualified"
00041 #define XML_SCHEMA_FORM_UNQUALIFIED "unqualified"
00042 #define XML_SCHEMA_FORM_NONE "none"
00043 
00044 #ifdef __cplusplus
00045 extern "C"
00046 {
00047 #endif
00048 
00049 struct xml_schema_form_ops
00050 {
00051     axis2_status_t (AXIS2_CALL *
00052     free) (void *form,
00053             const axis2_env_t *env);
00054 
00055     axis2_hash_t *(AXIS2_CALL *
00056     super_objs) (void *form,
00057             const axis2_env_t *env);
00058 
00059     xml_schema_types_t (AXIS2_CALL *
00060     get_type) (void *form,
00061             const axis2_env_t *env);
00062 
00063     xml_schema_enum_t *(AXIS2_CALL *
00064     get_base_impl) (void *form,
00065                     const axis2_env_t *env);
00066     
00067     axis2_array_list_t *(AXIS2_CALL *
00068     get_values)(void *form,
00069                 const axis2_env_t *env);
00070     
00071 };
00072 
00073 struct xml_schema_form
00074 {
00075     xml_schema_enum_t base;
00076     xml_schema_form_ops_t *ops;
00077 };
00078 
00079 AXIS2_EXTERN xml_schema_form_t * AXIS2_CALL
00080 xml_schema_form_create(const axis2_env_t *env,
00081                                     axis2_char_t* value);
00082 
00083 /***************** Macros ************************************************/
00084 
00085 #define XML_SCHEMA_FORM_FREE(form, env) \
00086       (((xml_schema_form_t *) form)->ops->free(form, env))
00087 
00088 #define XML_SCHEMA_FORM_SUPER_OBJS(form, env) \
00089       (((xml_schema_form_t *) form)->ops->super_objs(form, env))
00090 
00091 #define XML_SCHEMA_FORM_GET_TYPE(form, env) \
00092       (((xml_schema_form_t *) form)->ops->type(form, env))
00093 
00094 #define XML_SCHEMA_FORM_GET_BASE_IMPL(form, env) \
00095       (((xml_schema_form_t *) form)->ops->get_base_impl(form, env))
00096 
00097 #define XML_SCHEMA_FORM_GET_VALUES(form, env) \
00098       (((xml_schema_form_t *) form)->ops->values(form, env))
00099 
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104 #endif /* XML_SCHEMA_FORM_H */

Generated on Wed Dec 20 20:34:51 2006 for Axis2/C by  doxygen 1.5.1