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

xml_schema_complex_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_COMPLEX_TYPE_H
00018 #define XML_SCHEMA_COMPLEX_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_complex_type.h>
00031 #include <xml_schema_any_attribute.h>
00032 #include <xml_schema_obj_collection.h>
00033 #include <xml_schema_obj_table.h>
00034 #include <xml_schema_derivation_method.h>
00035 #include <xml_schema_content_type.h>
00041 typedef struct xml_schema_complex_type 
00042                     xml_schema_complex_type_t;
00043 typedef struct xml_schema_complex_type_ops 
00044                     xml_schema_complex_type_ops_t;
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049 
00050 struct xml_schema_complex_type_ops
00051 {
00056     axis2_status_t (AXIS2_CALL *
00057     free) (void *cmp_type,
00058            const axis2_env_t *env);
00059 
00060     xml_schema_type_t *(AXIS2_CALL *
00061     get_base_impl)(
00062             void *cmp_type,
00063             const axis2_env_t *env);
00064             
00065     axis2_hash_t *(AXIS2_CALL *
00066     super_objs)(
00067             void *cmp_type,
00068             const axis2_env_t *env);
00069             
00070     xml_schema_types_t (AXIS2_CALL *
00071     get_type)(
00072             void *cmp_type,
00073             const axis2_env_t *env);                        
00074 
00075     xml_schema_any_attribute_t* (AXIS2_CALL *
00076     get_any_attribute)(
00077             void *cmp_type,
00078             const axis2_env_t *env);
00079             
00080     axis2_status_t  (AXIS2_CALL *
00081     set_any_attribute)(
00082             void *cmp_type,
00083             const axis2_env_t *env,
00084             xml_schema_any_attribute_t *any_attr);
00085             
00086     xml_schema_obj_collection_t* (AXIS2_CALL *
00087     get_attributes)(
00088             void *cmp_type,
00089             const axis2_env_t *env);
00090             
00091     xml_schema_obj_table_t* (AXIS2_CALL *
00092     get_attribute_use)(
00093             void *cmp_type,
00094             const axis2_env_t *env);
00095     
00096     xml_schema_any_attribute_t* (AXIS2_CALL *
00097     get_attribute_wildcard)(
00098             void *cmp_type,
00099             const axis2_env_t *env);
00100             
00101     xml_schema_derivation_method_t* (AXIS2_CALL *
00102     get_block)(
00103             void *cmp_type,
00104             const axis2_env_t *env);
00105             
00106     axis2_status_t (AXIS2_CALL *
00107     set_block)(
00108             void *cmp_type,
00109             const axis2_env_t *env,
00110             xml_schema_derivation_method_t *block);
00111             
00112     xml_schema_derivation_method_t* (AXIS2_CALL *
00113     get_block_resolved)(
00114             void *cmp_type,
00115             const axis2_env_t *env);
00116             
00117     void* (AXIS2_CALL *
00118     get_content_model)(
00119             void *cmp_type,
00120             const axis2_env_t *env);
00121             
00122     axis2_status_t (AXIS2_CALL *
00123     set_content_model)(
00124             void *cmp_type,
00125             const axis2_env_t *env,
00126             void *content_model);
00127             
00128     xml_schema_content_type_t* (AXIS2_CALL *
00129     get_content_type)(
00130             void *cmp_type,
00131             const axis2_env_t *env);
00132             
00133     axis2_status_t (AXIS2_CALL *
00134     set_content_type)(
00135             void *cmp_type,
00136             const axis2_env_t *env,
00137             xml_schema_content_type_t *content_type);    
00138             
00139     xml_schema_particle_t * (AXIS2_CALL *
00140     get_content_type_particle)(
00141             void *cmp_type,
00142             const axis2_env_t *env);                    
00143                                                 
00144     axis2_bool_t (AXIS2_CALL *
00145     is_abstract)(
00146             void *cmp_type,
00147             const axis2_env_t *env);
00148             
00149     axis2_status_t (AXIS2_CALL *
00150     set_abstract)(
00151             void *cmp_type,
00152             const axis2_env_t *env,
00153             axis2_bool_t b);
00154             
00155     axis2_bool_t (AXIS2_CALL*
00156     is_mixed)(
00157             void *cmp_type,
00158             const axis2_env_t *env);
00159             
00160     axis2_status_t (AXIS2_CALL *
00161     set_mixed)(
00162             void *cmp_type,
00163             const axis2_env_t *env,
00164             axis2_bool_t b);
00165             
00166     void* (AXIS2_CALL *
00167     get_particle)(
00168             void *cmp_type,
00169             const axis2_env_t *env);
00170             
00171     axis2_status_t (AXIS2_CALL *
00172     set_particle)(
00173             void *cmp_type,
00174             const axis2_env_t *env,
00175             void *particle);
00176                         
00177             
00178             
00179     axis2_char_t* (AXIS2_CALL*
00180     to_string)(
00181             void *cmp_type,
00182             const axis2_env_t *env,
00183             axis2_char_t *prefix,
00184             int tab);
00185             
00186 };
00187 
00188 struct xml_schema_complex_type
00189 {
00190     xml_schema_type_t base;
00191     xml_schema_complex_type_ops_t *ops;
00192 };
00193 
00202 AXIS2_EXTERN xml_schema_complex_type_t * AXIS2_CALL
00203 xml_schema_complex_type_create(const axis2_env_t *env,
00204                         struct xml_schema *schema);
00205 
00206 /************************** macros *******************************************/
00207 
00208 #define XML_SCHEMA_COMPLEX_TYPE_FREE(complex_type, env) \
00209       (((xml_schema_complex_type_t *) complex_type)->ops->\
00210           free(complex_type, env))
00211 
00212 #define XML_SCHEMA_COMPLEX_TYPE_GET_BASE_IMPL(complex_type, env) \
00213       (((xml_schema_complex_type_t *) complex_type)->ops->\
00214           get_base_impl(complex_type, env))
00215           
00216 #define XML_SCHEMA_COMPLEX_TYPE_GET_TYPE(complex_type, env) \
00217       (((xml_schema_complex_type_t *) complex_type)->ops->\
00218           get_type(complex_type, env))
00219           
00220 #define XML_SCHEMA_COMPLEX_TYPE_SUPER_OBJS(complex_type, env) \
00221       (((xml_schema_complex_type_t *) complex_type)->ops->\
00222           super_objs(complex_type, env))                    
00223 
00224 #define XML_SCHEMA_COMPLEX_TYPE_GET_ANY_ATTRIBUTE(complex_type, env) \
00225       (((xml_schema_complex_type_t *) complex_type)->ops->\
00226           get_any_attribute(complex_type, env))
00227 
00228 #define XML_SCHEMA_COMPLEX_TYPE_SET_ANY_ATTRIBUTE(complex_type, env, any_attr) \
00229       (((xml_schema_complex_type_t *) complex_type)->ops->\
00230           set_any_attribute(complex_type, env, any_attr))
00231 
00232 #define XML_SCHEMA_COMPLEX_TYPE_GET_ATTRIBUTES(complex_type, env) \
00233       (((xml_schema_complex_type_t *) complex_type)->ops->\
00234           get_attributes(complex_type, env))
00235       
00236 #define XML_SCHEMA_COMPLEX_TYPE_GET_ATTRIBUTE_USE(complex_type, env) \
00237       (((xml_schema_complex_type_t *) complex_type)->ops->\
00238           get_attribute_use(complex_type, env))
00239       
00240 #define XML_SCHEMA_COMPLEX_TYPE_GET_ATTRIBUTE_WILDCARD(complex_type, env) \
00241       (((xml_schema_complex_type_t *) complex_type)->ops->\
00242           get_attribute_wildcard(complex_type, env))      
00243 
00244 #define XML_SCHEMA_COMPLEX_TYPE_GET_BLOCK(complex_type, env) \
00245       (((xml_schema_complex_type_t *) complex_type)->ops->\
00246           get_block(complex_type, env))
00247 
00248 #define XML_SCHEMA_COMPLEX_TYPE_SET_BLOCK(complex_type, env, block) \
00249       (((xml_schema_complex_type_t *) complex_type)->ops->\
00250           set_block(complex_type, env, block))
00251       
00252 #define XML_SCHEMA_COMPLEX_TYPE_GET_BLOCK_RESOLVED(complex_type, env) \
00253       (((xml_schema_complex_type_t *) complex_type)->ops->\
00254           get_block_resolved(complex_type, env))
00255       
00256 #define XML_SCHEMA_COMPLEX_TYPE_GET_CONTENT_MODEL(complex_type, env, cnt_mtype) \
00257       (((xml_schema_complex_type_t *) complex_type)->ops->\
00258           get_content_model(complex_type, env, cnt_mtype))   
00259       
00260 #define XML_SCHEMA_COMPLEX_TYPE_SET_CONTENT_MODEL(complex_type, env, cnt_model) \
00261       (((xml_schema_complex_type_t *) complex_type)->ops->\
00262           set_content_model(complex_type, env, cnt_model))
00263                                
00264 #define XML_SCHEMA_COMPLEX_TYPE_GET_CONTENT_TYPE(complex_type, env) \
00265       (((xml_schema_complex_type_t *) complex_type)->ops->\
00266           get_content_type(complex_type, env))         
00267       
00268 #define XML_SCHEMA_COMPLEX_TYPE_SET_CONTENT_TYPE(complex_type, env, cnt_type) \
00269       (((xml_schema_complex_type_t *) complex_type)->ops->\
00270           set_content_type(complex_type, env, cnt_type))
00271       
00272 #define XML_SCHEMA_COMPLEX_TYPE_GET_CONTENT_TYPE_PARTICLE(complex_type, env) \
00273         (((xml_schema_complex_type_t *) complex_type)->ops->\
00274             get_content_type_particle(complex_type, env))
00275         
00276 #define XML_SCHEMA_COMPLEX_TYPE_IS_ABSTRACT(complex_type, env) \
00277       (((xml_schema_complex_type_t *) complex_type)->ops->\
00278           is_abstract(complex_type, env))
00279       
00280 #define XML_SCHEMA_COMPLEX_TYPE_SET_ABSTRACT(complex_type, env, b) \
00281       (((xml_schema_complex_type_t *) complex_type)->ops->\
00282           set_abstract(complex_type, env, b))   
00283       
00284 #define XML_SCHEMA_COMPLEX_TYPE_IS_MIXED(complex_type, env) \
00285       (((xml_schema_complex_type_t *) complex_type)->ops->\
00286           is_mixed(complex_type, env))
00287       
00288 #define XML_SCHEMA_COMPLEX_TYPE_SET_MIXED(complex_type, env, b) \
00289       (((xml_schema_complex_type_t *) complex_type)->ops->\
00290           set_mixed(complex_type, env, b))                                
00291       
00292 #define XML_SCHEMA_COMPLEX_TYPE_GET_PARTICLE(complex_type, env) \
00293         (((xml_schema_complex_type_t *) complex_type)->ops->\
00294             get_particle(complex_type, env))
00295         
00296 #define XML_SCHEMA_COMPLEX_TYPE_SET_PARTICLE(complex_type, env, particle) \
00297         (((xml_schema_complex_type_t *)complex_type)->ops->\
00298             set_particle(complex_type, env, particle))              
00299       
00300 #define XML_SCHEMA_COMPLEX_TYPE_TO_STRING(complex_type, env, prefix, tab) \
00301       (((xml_schema_complex_type_t *) complex_type)->ops->\
00302           to_string(complex_type, env, prefix, tab))
00303 
00304 /******************************** end macros **********************************/         
00305                                                   
00307 #ifdef __cplusplus
00308 }
00309 #endif
00310 #endif /* XML_SCHEMA_COMPLEX_TYPE_H */

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