woden_bool_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_BOOL_ATTR_H
00018 #define WODEN_BOOL_ATTR_H
00019 
00029 #include <woden_xml_attr.h>
00030 #include <woden.h>
00031 
00037 typedef struct woden_bool_attr woden_bool_attr_t;
00038 typedef struct woden_bool_attr_ops woden_bool_attr_ops_t;
00039 struct axiom_element;
00040 struct axiom_node;
00041 
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046 
00047 struct woden_bool_attr_ops
00048 {
00053     axis2_status_t (AXIS2_CALL *
00054     free) (
00055             void *bool_attr,
00056             const axis2_env_t *env);
00057     
00058     axis2_status_t (AXIS2_CALL *
00059     to_bool_attr_free) (
00060             void *bool_attr,
00061             const axis2_env_t *env);
00062     
00063     woden_obj_types_t (AXIS2_CALL *
00064     type) (
00065             void *bool_attr,
00066             const axis2_env_t *env);
00067 
00071     woden_xml_attr_t *(AXIS2_CALL *
00072     get_base_impl) (
00073             void *bool_attr,
00074             const axis2_env_t *env);
00075 
00076     /* ************************************************************
00077      *  BooleanAttr interface declared methods 
00078      * ************************************************************/
00079 
00080     axis2_bool_t (AXIS2_CALL *
00081     get_boolean) (
00082             void *bool_attr,
00083             const axis2_env_t *env);
00084 
00085     /* ************************************************************
00086      *  Non-API implementation methods 
00087      * ************************************************************/
00088 
00095     void *(AXIS2_CALL *
00096     convert) (
00097             void *bool_attr,
00098             const axis2_env_t *env,
00099             struct axiom_element *owner_el,
00100             struct axiom_node *owner_node,
00101             axis2_char_t *attr_value);
00102 
00103   
00104 };
00105 
00106 struct woden_bool_attr
00107 {
00108     woden_xml_attr_t base;
00109     woden_bool_attr_ops_t *ops;
00110 };
00111 
00112 /*
00113  * TODO This constructor is not used for extension attributes, but may be useful if
00114  * parsing of native WSDL attributes is changed to use the axis2_xml_attr interface.
00115  */
00116 AXIS2_EXTERN woden_bool_attr_t * AXIS2_CALL
00117 woden_bool_attr_create(
00118         const axis2_env_t *env,
00119         struct axiom_element *owner_el,
00120         struct axiom_node *owner_node,
00121         axis2_qname_t *attr_type,
00122         axis2_char_t *attr_value);
00123 
00124 
00125 /************************Woden C Internal Methods******************************/
00126 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00127 woden_bool_attr_resolve_methods(
00128         woden_bool_attr_t *bool_attr,
00129         const axis2_env_t *env,
00130         axis2_hash_t *methods);
00131 /************************End of Woden C Internal Methods***********************/
00132 
00133 #define WODEN_BOOL_ATTR_FREE(bool_attr, env) \
00134       (((woden_bool_attr_t *) bool_attr)->ops->free(bool_attr, env))
00135 
00136 #define WODEN_BOOL_ATTR_TO_BOOL_ATTR_FREE(bool_attr, env) \
00137       (((woden_bool_attr_t *) bool_attr)->ops->\
00138          to_bool_attr_free(bool_attr, env))
00139 
00140 #define WODEN_BOOL_ATTR_TYPE(bool_attr, env) \
00141       (((woden_bool_attr_t *) bool_attr)->ops->\
00142          type(bool_attr, env))
00143 
00144 #define WODEN_BOOL_ATTR_GET_BASE_IMPL(bool_attr, env) \
00145       (((woden_bool_attr_t *) bool_attr)->ops->\
00146          get_base_impl(bool_attr, env))
00147 
00148 #define WODEN_BOOL_ATTR_GET_BOOL(bool_attr, env) \
00149       (((woden_bool_attr_t *) bool_attr)->ops->\
00150          get_boolean(bool_attr, env))
00151 
00152 #define WODEN_BOOL_ATTR_CONVERT(bool_attr, env) \
00153       (((woden_bool_attr_t *) bool_attr)->ops->\
00154          convert(bool_attr, env))
00155 
00157 #ifdef __cplusplus
00158 }
00159 #endif
00160 #endif /* WODEN_BOOL_ATTR_H */

Generated on Tue Oct 3 18:21:10 2006 for Axis2/C by  doxygen 1.4.7