woden_qname_list_or_token_any_attr.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 WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_H
00018 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_H
00019 
00028 #include <woden.h>
00029 #include <woden_xml_attr.h>
00030 #include <axis2_array_list.h>
00031 
00037 typedef struct woden_qname_list_or_token_any_attr 
00038         woden_qname_list_or_token_any_attr_t;
00039 typedef struct woden_qname_list_or_token_any_attr_ops 
00040         woden_qname_list_or_token_any_attr_ops_t;
00041 struct axiom_element;
00042 struct axiom_node;
00043 
00044 #ifdef __cplusplus
00045 extern "C"
00046 {
00047 #endif
00048 
00049 struct woden_qname_list_or_token_any_attr_ops
00050 {
00055     axis2_status_t (AXIS2_CALL *
00056     free) (
00057             void *list_token_attr,
00058             const axis2_env_t *env);
00059     
00060     axis2_status_t (AXIS2_CALL *
00061     to_qname_list_or_token_any_attr_free) (
00062             void *list_token_attr,
00063             const axis2_env_t *env);
00064     
00065     woden_obj_types_t (AXIS2_CALL *
00066     type) (
00067             void *list_token_attr,
00068             const axis2_env_t *env);
00069 
00073     woden_xml_attr_t *(AXIS2_CALL *
00074     get_base_impl) (
00075             void *list_token_attr,
00076             const axis2_env_t *env);
00077 
00078     /* ************************************************************
00079      *  QNameAttr interface declared methods 
00080      * ************************************************************/
00081 
00082     axis2_bool_t (AXIS2_CALL *
00083     is_qname_list) (
00084             void *list_token_attr,
00085             const axis2_env_t *env); 
00086 
00087     axis2_bool_t (AXIS2_CALL *
00088     is_token) (
00089             void *list_token_attr,
00090             const axis2_env_t *env);
00091 
00092 
00093     axis2_array_list_t *(AXIS2_CALL *
00094     get_qnames) (
00095             void *list_token_attr,
00096             const axis2_env_t *env);
00097 
00098     axis2_char_t *(AXIS2_CALL *
00099     get_token) (
00100             void *list_token_attr,
00101             const axis2_env_t *env);
00102 
00103     /* ************************************************************
00104      *  Non-API implementation methods 
00105      * ************************************************************/
00106 
00107     /*
00108      * Convert a string of type "Union of list of xs:QName or xs:token #any" to a 
00109      * axis2_qname_t or  array or a String.
00110      * A null argument will return a null value.
00111      * Any conversion error will be reported and a null value will be returned.
00112      */
00113     void *(AXIS2_CALL *
00114     convert) (
00115             void *list_token_attr,
00116             const axis2_env_t *env,
00117             struct axiom_element *owner_el,
00118             struct axiom_node *owner_node,
00119             axis2_char_t *attr_value);
00120 
00121 };
00122 
00123 struct woden_qname_list_or_token_any_attr
00124 {
00125     woden_xml_attr_t base;
00126     woden_qname_list_or_token_any_attr_ops_t *ops;
00127 };
00128 
00129 /*
00130  * TODO This constructor is not used for extension attributes, but may be useful if
00131  * parsing of native WSDL attributes is changed to use the XMLAttr interface.
00132  */
00133 AXIS2_EXTERN woden_qname_list_or_token_any_attr_t * AXIS2_CALL
00134 woden_qname_list_or_token_any_attr_create(
00135         const axis2_env_t *env,
00136         struct axiom_element *owner_el,
00137         struct axiom_node *owner_node,
00138         axis2_qname_t *attr_type,
00139         axis2_char_t *attr_value);
00140 
00141 
00142 /************************Woden C Internal Methods******************************/
00143 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00144 woden_qname_list_or_token_any_attr_resolve_methods(
00145         woden_qname_list_or_token_any_attr_t *list_token_attr,
00146         const axis2_env_t *env,
00147         axis2_hash_t *methods);
00148 /************************End of Woden C Internal Methods***********************/
00149 
00150 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_FREE(list_token_attr, env) \
00151       (((woden_qname_list_or_token_any_attr_t *) \
00152           list_token_attr)->ops->free(list_token_attr, env))
00153 
00154 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_TO_QNAME_LIST_OR_TOKEN_ANY_ATTR_FREE(\
00155         list_token_attr, env) \
00156       (((woden_qname_list_or_token_any_attr_t *) list_token_attr)->ops->\
00157          to_qname_list_or_token_any_attr_free(list_token_attr, env))
00158 
00159 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_TYPE(list_token_attr, env) \
00160       (((woden_qname_list_or_token_any_attr_t *) list_token_attr)->ops->\
00161          type(list_token_attr, env))
00162 
00163 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_GET_BASE_IMPL(list_token_attr, \
00164         env) \
00165       (((woden_qname_list_or_token_any_attr_t *) \
00166           list_token_attr)->ops->get_base_impl(list_token_attr, \
00167                                                           env))
00168 
00169 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_QNAME_LIST(list_token_attr, \
00170         env) \
00171       (((woden_qname_list_or_token_any_attr_t *) \
00172           list_token_attr)->ops->is_qname_list(list_token_attr, \
00173                                                             env))
00174 
00175 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_TOKEN(list_token_attr, env) \
00176       (((woden_qname_list_or_token_any_attr_t *) \
00177           list_token_attr)->ops->is_token(list_token_attr, \
00178                                                        env))
00179 
00180 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_GET_QNAMES(list_token_attr, \
00181         env) \
00182       (((woden_qname_list_or_token_any_attr_t *) \
00183           list_token_attr)->ops->get_qnames(list_token_attr, \
00184                                                          env))
00185 
00186 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_GET_TOKEN(list_token_attr, \
00187         env) \
00188       (((woden_qname_list_or_token_any_attr_t *) \
00189           list_token_attr)->ops->get_token(list_token_attr, \
00190                                                          env))
00191 
00192 #define WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_CONVERT(list_token_attr, env) \
00193       (((woden_qname_list_or_token_any_attr_t *) \
00194           list_token_attr)->ops->convert(list_token_attr, \
00195                                                       env))
00196 
00198 #ifdef __cplusplus
00199 }
00200 #endif
00201 #endif /* WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_H */

Generated on Thu Oct 26 21:00:12 2006 for Axis2/C by  doxygen 1.4.7