xml_schema_simple_type.h

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_SIMPLE_TYPE_H
00019 #define XML_SCHEMA_SIMPLE_TYPE_H
00020 
00027 #include <xml_schema_annotated.h>
00028 #include <xml_schema_type.h>
00029 #include <axis2_hash.h>
00030 #include <axis2_qname.h>
00031 #include <xml_schema_simple_type_content.h>
00037 typedef struct xml_schema_simple_type 
00038                     xml_schema_simple_type_t;
00039 typedef struct xml_schema_simple_type_ops 
00040                     xml_schema_simple_type_ops_t;
00041 #ifdef __cplusplus
00042 extern "C"
00043 {
00044 #endif
00045 
00046 struct xml_schema_simple_type_ops
00047 {
00052     axis2_status_t (AXIS2_CALL *
00053     free) (void *simple_type,
00054             const axis2_env_t *env);
00055 
00056     xml_schema_type_t *(AXIS2_CALL *
00057     get_base_impl) (void *simple_type,
00058                     const axis2_env_t *env);
00059                     
00060     xml_schema_types_t (AXIS2_CALL *
00061     get_type) (void *simple_type,
00062             const axis2_env_t *env);
00063                     
00064     axis2_hash_t* (AXIS2_CALL *
00065     super_objs) (void *simple_type,
00066                  const axis2_env_t *env);                                        
00067                     
00068     xml_schema_simple_type_content_t* (AXIS2_CALL *
00069     get_content)(void *simple_type,
00070                  const axis2_env_t *env);
00071                  
00072     axis2_status_t (AXIS2_CALL*
00073     set_content)(void *simple_type,
00074                  const axis2_env_t *env,
00075                  xml_schema_simple_type_content_t *simple_content);
00076                  
00077     axis2_char_t* (AXIS2_CALL *
00078     to_string)(void *simple_type,
00079                const axis2_env_t *env,
00080                axis2_char_t *prefix,
00081                int tab);
00082 };
00083 
00084 struct xml_schema_simple_type
00085 {
00086     xml_schema_type_t base;
00087     xml_schema_simple_type_ops_t *ops;
00088 };
00089 
00098 AXIS2_EXTERN xml_schema_simple_type_t * AXIS2_CALL
00099 xml_schema_simple_type_create(const axis2_env_t *env,
00100                                 struct xml_schema *schema);
00101 
00112  /***************** Macros ***************************************************/
00113 #define XML_SCHEMA_SIMPLE_TYPE_FREE(simple_type, env) \
00114       (((xml_schema_simple_type_t *) simple_type)->ops->\
00115             free(simple_type, env))
00116 
00117 #define XML_SCHEMA_SIMPLE_TYPE_GET_BASE_IMPL(simple_type, env) \
00118       (((xml_schema_simple_type_t *) simple_type)->ops->\
00119             get_base_impl(simple_type, env))
00120 
00121 #define XML_SCHEMA_SIMPLE_TYPE_GET_TYPE(simple_type, env) \
00122       (((xml_schema_simple_type_t *) simple_type)->ops->\
00123             get_type(simple_type, env))
00124             
00125 #define XML_SCHEMA_SIMPLE_TYPE_SUPER_OBJS(simple_type, env) \
00126       (((xml_schema_simple_type_t *) simple_type)->ops->\
00127             super_objs(simple_type, env))            
00128 
00129 #define XML_SCHEMA_SIMPLE_TYPE_GET_CONTENT(simple_type, env) \
00130       (((xml_schema_simple_type_t *) simple_type)->ops->\
00131             get_content(simple_type, env))
00132 
00133 #define XML_SCHEMA_SIMPLE_TYPE_SET_CONTENT(simple_type, env, content) \
00134       (((xml_schema_simple_type_t *) simple_type)->ops->\
00135             set_content(simple_type, env, content))
00136 
00137 #define XML_SCHEMA_SIMPLE_TYPE_TO_STRING(simple_type, env) \
00138       (((xml_schema_simple_type_t *) simple_type)->ops->\
00139             to_string(simple_type, env))
00140                                                            
00141 /************************ end macros ********************************************/                                                           
00143 #ifdef __cplusplus
00144 }
00145 #endif
00146 #endif /* XML_SCHEMA_SIMPLE_TYPE_H */

Generated on Wed Dec 20 20:14:11 2006 for Axis2/C by  doxygen 1.5.1