xml_schema_simple_type.h

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

Generated on Tue Oct 3 18:21:11 2006 for Axis2/C by  doxygen 1.4.7