xml_schema_attribute.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_ATTRIBUTE_H
00019 #define XML_SCHEMA_ATTRIBUTE_H
00020 
00029 #include <axis2_qname.h>
00030 #include <xml_schema_particle.h>
00031 #include <xml_schema_form.h>
00032 #include <xml_schema_use.h>
00033 #include <xml_schema_content_processing.h>
00034 #include <xml_schema_simple_type.h>
00035 
00036 
00043 #ifdef __cplusplus
00044 extern "C"
00045 {
00046 #endif
00047 
00048 
00049 typedef struct xml_schema_attribute 
00050                     xml_schema_attribute_t;
00051 typedef struct xml_schema_attribute_ops 
00052                 xml_schema_attribute_ops_t;
00053 
00054 struct xml_schema_attribute_ops
00055 {
00056     axis2_status_t (AXIS2_CALL *
00057     free) (
00058             void *attr,
00059             const axis2_env_t *env);
00060             
00061     xml_schema_types_t (AXIS2_CALL *
00062     get_type)(
00063             void *attr,
00064             const axis2_env_t *env);
00065           
00066     axis2_hash_t* (AXIS2_CALL *
00067     super_objs)(
00068             void *attr,
00069             const axis2_env_t *env);
00070                                       
00071 
00072     xml_schema_annotated_t *(AXIS2_CALL *
00073     get_base_impl)(
00074             void *attr,
00075             const axis2_env_t *env);
00076     
00077     void *(AXIS2_CALL *
00078     get_attr_type)(
00079             void *attr,
00080             const axis2_env_t *env);
00081 
00082     axis2_char_t *(AXIS2_CALL *
00083     get_default_value)(
00084             void *attr,
00085             const axis2_env_t *env);                        
00086 
00087     axis2_status_t (AXIS2_CALL *
00088     set_default_value)(
00089             void *attr,
00090             const axis2_env_t *env,
00091             axis2_char_t *default_value);  
00092     
00093     axis2_char_t* (AXIS2_CALL *
00094     get_fixed_value)(void *attr,
00095                         const axis2_env_t *env);
00096 
00097     axis2_status_t (AXIS2_CALL *
00098     set_fixed_value)(void *attr,
00099                      const axis2_env_t *env,
00100                      axis2_char_t *fixed_value);
00101 
00102     struct xml_schema_form *(AXIS2_CALL *
00103     get_schema_form) (void *attr,
00104                       const axis2_env_t *env);
00105 
00106     axis2_status_t (AXIS2_CALL *
00107     set_schema_form)(void *attr,
00108                      const axis2_env_t *env,
00109                      xml_schema_form_t *schema_form);
00110                      
00111     axis2_qname_t* (AXIS2_CALL *
00112     get_qname)(void *attr,
00113                const axis2_env_t *env);
00114                
00115     axis2_status_t (AXIS2_CALL *
00116     set_qname)(void *attr,
00117                const axis2_env_t *env,
00118                axis2_qname_t *qualified_name);
00119                
00120     axis2_char_t* (AXIS2_CALL *
00121     get_name)(void *attr,
00122               const axis2_env_t *env);
00123               
00124     axis2_status_t (AXIS2_CALL *
00125     set_name)(void *attr,
00126               const axis2_env_t *env,
00127               axis2_char_t *name);
00128               
00129     axis2_qname_t* (AXIS2_CALL *
00130     get_ref_name)(void *attr,
00131                   const axis2_env_t *env);
00132                                               
00133     axis2_status_t (AXIS2_CALL *
00134     set_ref_name)(void *attr,
00135                   const axis2_env_t *env,
00136                   axis2_qname_t *ref_name);
00137                   
00138     xml_schema_simple_type_t* (AXIS2_CALL *
00139     get_schema_type)(void *attr,
00140                      const axis2_env_t *env);
00141                      
00142     axis2_status_t (AXIS2_CALL *
00143     set_schema_type)(void *attr,
00144                      const axis2_env_t *env,
00145                      xml_schema_simple_type_t* sch_type);                     
00146                      
00147     axis2_qname_t* (AXIS2_CALL *
00148     get_schema_type_name)(void *attr,
00149                           const axis2_env_t *env);
00150                           
00151                               
00152     axis2_status_t (AXIS2_CALL *
00153     set_schema_type_name)(void *attr,
00154                           const axis2_env_t *env,
00155                           axis2_qname_t *sch_type_name);
00156                           
00157     xml_schema_use_t* (AXIS2_CALL *
00158     get_use)(void *attr,
00159              const axis2_env_t *env);
00160              
00161     axis2_status_t (AXIS2_CALL *
00162     set_use)(void *attr,
00163              const axis2_env_t *env,
00164              xml_schema_use_t *use);
00165              
00166     axis2_char_t* (AXIS2_CALL*
00167     to_string)(void *attr,
00168                const axis2_env_t *env,
00169                axis2_char_t *prefix,
00170                int tab);                          
00171 };
00172 
00173 struct xml_schema_attribute
00174 {
00175     xml_schema_annotated_t base;
00176     xml_schema_attribute_ops_t *ops;
00177 };
00178 
00179 AXIS2_EXTERN xml_schema_attribute_t * AXIS2_CALL
00180 xml_schema_attribute_create(const axis2_env_t *env);
00181 
00182 
00183 /******************************* Macros *************************************************/ 
00184  
00185 #define XML_SCHEMA_ATTRIBUTE_FREE(attr, env) \
00186       (((xml_schema_attribute_t *) attr)->ops->free(attr, env))
00187 
00188 #define XML_SCHEMA_ATTRIBUTE_GET_BASE_IMPL(attr, env) \
00189       (((xml_schema_attribute_t *) attr)->ops->get_base_impl(attr, env))
00190 
00191 #define XML_SCHEMA_ATTRIBUTE_GET_TYPE(attr, env) \
00192       (((xml_schema_attribute_t *) attr)->ops->get_type(attr, env))
00193       
00194 #define XML_SCHEMA_ATTRIBUTE_SUPER_OBJS(attr, env) \
00195       (((xml_schema_attribute_t *) attr)->ops->super_objs(attr, env))
00196       
00197 
00198 #define XML_SCHEMA_ATTRIBUTE_GET_ATTR_TYPE(attr, env) \
00199       (((xml_schema_attribute_t *) attr)->ops->get_namespace(attr, env))
00200 
00201 #define XML_SCHEMA_ATTRIBUTE_GET_DEFAULT_VALUE(attr, env) \
00202       (((xml_schema_attribute_t *) attr)->ops->\
00203           get_default_value(attr, env))
00204 
00205 #define XML_SCHEMA_ATTRIBUTE_SET_DEFAULT_VALUE(attr, env, default_val) \
00206       (((xml_schema_attribute_t *) attr)->ops->\
00207           set_default_value(attr, env, default_val))
00208 
00209 #define XML_SCHEMA_ATTRIBUTE_GET_FIXED_VALUE(attr, env) \
00210       (((xml_schema_attribute_t *) attr)->ops->\
00211           get_fixed_value(attr, env))
00212 
00213 #define XML_SCHEMA_ATTRIBUTE_SET_FIXED_VALUE(attr, env, default_val) \
00214       (((xml_schema_attribute_t *) attr)->ops->\
00215           set_fixed_value(attr, env, default_val))
00216 
00217 #define XML_SCHEMA_ATTRIBUTE_GET_SCHEMA_FORM(attr, env) \
00218       (((xml_schema_attribute_t *) attr)->ops->\
00219           get_schema_form(attr, env))
00220 
00221 #define XML_SCHEMA_ATTRIBUTE_SET_SCHEMA_FORM(attr, env, form) \
00222       (((xml_schema_attribute_t *) attr)->ops->\
00223           set_schema_form(attr, env, form))
00224 
00225 #define XML_SCHEMA_ATTRIBUTE_GET_QNAME(attr, env) \
00226       (((xml_schema_attribute_t *) attr)->ops->\
00227           get_qname(attr, env))
00228 
00229 #define XML_SCHEMA_ATTRIBUTE_SET_QNAME(attr, env, qualified_name) \
00230       (((xml_schema_attribute_t *) attr)->ops->\
00231           set_qname(attr, env, qualified_name))
00232           
00233 #define XML_SCHEMA_ATTRIBUTE_GET_NAME(attr, env) \
00234       (((xml_schema_attribute_t *) attr)->ops->\
00235           get_name(attr, env))
00236           
00237 #define XML_SCHEMA_ATTRIBUTE_SET_NAME(attr, env, name) \
00238       (((xml_schema_attribute_t *) attr)->ops->\
00239           set_name(attr, env, name))
00240 
00241 #define XML_SCHEMA_ATTRIBUTE_GET_REF_NAME(attr, env) \
00242       (((xml_schema_attribute_t *) attr)->ops->\
00243           get_ref_name(attr, env))
00244           
00245 #define XML_SCHEMA_ATTRIBUTE_SET_REF_NAME(attr, env, ref_name) \
00246       (((xml_schema_attribute_t *) attr)->ops->\
00247           set_ref_name(attr, env, ref_name))
00248 
00249 #define XML_SCHEMA_ATTRIBUTE_GET_SCHEMA_TYPE(attr, env) \
00250       (((xml_schema_attribute_t *) attr)->ops->\
00251           get_schema_type(attr, env))
00252           
00253 #define XML_SCHEMA_ATTRIBUTE_SET_SCHEMA_TYPE(attr, env, sch_type) \
00254       (((xml_schema_attribute_t *) attr)->ops->\
00255           set_schema_type(attr, env, sch_type))
00256           
00257 #define XML_SCHEMA_ATTRIBUTE_GET_SCHEMA_TYPE_NAME(attr, env) \
00258       (((xml_schema_attribute_t *) attr)->ops->\
00259           get_schema_type_name(attr, env))
00260 
00261 #define XML_SCHEMA_ATTRIBUTE_SET_SCHEMA_TYPE_NAME(attr, env, sch_type_name) \
00262       (((xml_schema_attribute_t *) attr)->ops->\
00263           set_schema_type_name(attr, env, sch_type_name))
00264           
00265 #define XML_SCHEMA_ATTRIBUTE_GET_USE(attr, env) \
00266       (((xml_schema_attribute_t *) attr)->ops->\
00267           get_use(attr, env))
00268 
00269 #define XML_SCHEMA_ATTRIBUTE_SET_USE(attr, env, use) \
00270       (((xml_schema_attribute_t *) attr)->ops->\
00271           set_schema_type_name(attr, env, use))   
00272           
00273 #define XML_SCHEMA_ATTRIBUTE_TO_STRING(attr, env, prefix, tab) \
00274       (((xml_schema_attribute_t *) attr)->ops->\
00275           to_string(attr, env, prefix, tab))   
00276                  
00277 
00278 /******************************* end macros ***********************************************/
00280 #ifdef __cplusplus
00281 }
00282 #endif
00283 #endif /* XML_SCHEMA_ATTRIBUTE_H */

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