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

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