xml_schema_particle.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_PARTICLE_H
00018 #define XML_SCHEMA_PARTICLE_H
00019 
00026 #include <xml_schema_defines.h>
00027 #include <xml_schema_annotated.h>
00028 #include <axis2_hash.h>
00029 
00035 typedef struct xml_schema_particle 
00036                     xml_schema_particle_t;
00037 typedef struct xml_schema_particle_ops 
00038                     xml_schema_particle_ops_t;
00039 
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044 
00045 struct xml_schema_particle_ops
00046 {
00051     axis2_status_t (AXIS2_CALL *
00052     free) (
00053             void *particle,
00054             const axis2_env_t *env);
00055 
00056     axis2_hash_t *(AXIS2_CALL *
00057     super_objs) (
00058             void *particle,
00059             const axis2_env_t *env);
00060 
00061     xml_schema_types_t (AXIS2_CALL *
00062     get_type) (
00063             void *particle,
00064             const axis2_env_t *env);
00065 
00066     xml_schema_annotated_t *(AXIS2_CALL *
00067     get_base_impl) (void *particle,
00068                     const axis2_env_t *env);
00069 
00070     long (AXIS2_CALL *
00071     get_max_occurs)(void *particle,
00072                 const axis2_env_t *env);
00073     
00074     axis2_status_t (AXIS2_CALL *
00075     set_max_occurs)(void *particle,
00076                     const axis2_env_t *env,
00077                     long max_occurs);
00078     
00079     long (AXIS2_CALL *
00080     get_min_occurs)(void *particle,
00081                 const axis2_env_t *env);
00082     
00083     axis2_status_t (AXIS2_CALL *
00084     set_min_occurs)(void *particle,
00085                     const axis2_env_t *env,
00086                     long min_occurs);
00087 };
00088 
00089 struct xml_schema_particle
00090 {
00091     xml_schema_annotated_t base;
00092     xml_schema_particle_ops_t *ops;
00093 };
00094 
00103 AXIS2_EXTERN xml_schema_particle_t * AXIS2_CALL
00104 xml_schema_particle_create(const axis2_env_t *env);
00105 
00109 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00110 xml_schema_particle_resolve_methods(
00111                                 xml_schema_particle_t *particle,
00112                                 const axis2_env_t *env,
00113                                 xml_schema_particle_t *particle_impl,
00114                                 XML_SCHEMA_SUPER_OBJS_FN super_objs,
00115                                 XML_SCHEMA_GET_TYPE_FN get_type,
00116                                 XML_SCHEMA_FREE_FN free_fn);
00117 
00118 #define XML_SCHEMA_PARTICLE_FREE(particle, env) \
00119       (((xml_schema_particle_t *) particle)->ops->\
00120             free(particle, env))
00121 
00122 #define XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env) \
00123       (((xml_schema_particle_t *) particle)->ops->\
00124             super_objs(particle, env))
00125 
00126 #define XML_SCHEMA_PARTICLE_GET_TYPE(particle, env) \
00127       (((xml_schema_particle_t *) particle)->ops->\
00128             get_type(particle, env))
00129 
00130 #define XML_SCHEMA_PARTICLE_GET_BASE_IMPL(particle, env) \
00131       (((xml_schema_particle_t *) particle)->ops->\
00132             get_base_impl(particle, env))
00133 
00134 #define XML_SCHEMA_PARTICLE_GET_MAX_OCCURS(particle, env) \
00135       (((xml_schema_particle_t *) particle)->ops->\
00136             get_max_occurs(particle, env))
00137 
00138 #define XML_SCHEMA_PARTICLE_SET_MAX_OCCURS(particle, env, max_occurs) \
00139       (((xml_schema_particle_t *) particle)->ops->\
00140             set_max_occurs(particle, env, max_occurs))
00141 
00142 #define XML_SCHEMA_PARTICLE_GET_MIN_OCCURS(particle, env) \
00143       (((xml_schema_particle_t *) particle)->ops->\
00144             get_min_occurs(particle, env))
00145 
00146 #define XML_SCHEMA_PARTICLE_SET_MIN_OCCURS(particle, env, min_occurs) \
00147       (((xml_schema_particle_t *) particle)->ops->\
00148             set_min_occurs(particle, env, min_occurs))
00149 
00151 #ifdef __cplusplus
00152 }
00153 #endif
00154 #endif /* XML_SCHEMA_PARTICLE_H */

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