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

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