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

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