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

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

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