woden_feature.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_FEATURE_H
00019 #define WODEN_FEATURE_H
00020 
00030 #include <woden.h>
00031 #include <woden_feature_element.h>
00032 #include <woden_wsdl_obj.h>
00033 #include <woden_documentable.h>
00034 #include <woden_nested_component.h>
00035 
00041 typedef union woden_feature_base woden_feature_base_t;
00042 typedef struct woden_feature woden_feature_t;
00043 typedef struct woden_feature_ops woden_feature_ops_t;
00044 struct woden_documentation_element;
00045 struct woden_wsdl_component;
00046 struct woden_documentable;
00047 
00048 #ifdef __cplusplus
00049 extern "C"
00050 {
00051 #endif
00052 
00053 struct woden_feature_ops
00054 {
00059     axis2_status_t (AXIS2_CALL *
00060     free) (void *feature,
00061             const axis2_env_t *env);
00062 
00063     axis2_hash_t *(AXIS2_CALL *
00064     super_objs) (void *feature,
00065             const axis2_env_t *env);
00066 
00067     woden_obj_types_t (AXIS2_CALL *
00068     type) (void *feature,
00069             const axis2_env_t *env);
00073     struct woden_documentable *(AXIS2_CALL *
00074     get_base_impl) (
00075             void *feature,
00076             const axis2_env_t *env);
00077 
00078     axis2_uri_t *(AXIS2_CALL *
00079     get_ref) (
00080             void *feature,
00081             const axis2_env_t *env);
00082 
00083     axis2_bool_t (AXIS2_CALL *
00084     is_required) (
00085             void *feature,
00086             const axis2_env_t *env);
00087 
00088     void *(AXIS2_CALL *
00089     get_parent) (
00090             void *feature,
00091             const axis2_env_t *env);
00092 
00093     void *(AXIS2_CALL *
00094     to_element)  (
00095             void *feature,
00096             const axis2_env_t *env);
00097 
00098 };
00099 
00100 union woden_feature_base
00101 {
00102     woden_documentable_t documentable;
00103     woden_feature_element_t feature_element;
00104     woden_nested_component_t nested_component;
00105 };
00106 
00107 struct woden_feature
00108 {
00109     woden_feature_base_t base;
00110     woden_feature_ops_t *ops;
00111 };
00112 
00113 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00114 woden_feature_create(
00115         const axis2_env_t *env);
00116 
00117 
00118 /***************************Woden C Internal Methods***************************/
00119 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00120 woden_feature_to_feature_element(
00121         void *feature,
00122         const axis2_env_t *env);
00123 
00124 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00125 woden_feature_to_nested_element(
00126         void *feature,
00127         const axis2_env_t *env);
00128 
00129 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00130 woden_feature_to_documentable_element(
00131         void *feature,
00132         const axis2_env_t *env);
00133 
00134 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00135 woden_feature_to_documentable(
00136         void *feature,
00137         const axis2_env_t *env);
00138 
00139 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00140 woden_feature_to_wsdl_obj(
00141         void *feature,
00142         const axis2_env_t *env);
00143 
00144 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00145 woden_feature_to_nested_component(
00146         void *feature,
00147         const axis2_env_t *env);
00148 
00149 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00150 woden_feature_to_wsdl_component(
00151         void *feature,
00152         const axis2_env_t *env);
00153 
00154 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00155 woden_feature_to_element_extensible(
00156         void *feature,
00157         const axis2_env_t *env);
00158 
00159 AXIS2_EXTERN woden_feature_t * AXIS2_CALL
00160 woden_feature_to_attr_extensible(
00161         void *feature,
00162         const axis2_env_t *env);
00163 
00164 
00165 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00166 woden_feature_resolve_methods(
00167         woden_feature_t *feature,
00168         const axis2_env_t *env,
00169         woden_feature_t *feature_impl,
00170         axis2_hash_t *methods);
00171 /************************End of Woden C Internal Methods***********************/
00172 
00173 #define WODEN_FEATURE_FREE(feature, env) \
00174       (((woden_feature_t *) feature)->ops->free(feature, env))
00175 
00176 #define WODEN_FEATURE_SUPER_OBJS(feature, env) \
00177       (((woden_feature_t *) feature)->ops->super_objs(feature, env))
00178 
00179 #define WODEN_FEATURE_TYPE(feature, env) \
00180       (((woden_feature_t *) feature)->ops->type(feature, env))
00181 
00182 #define WODEN_FEATURE_GET_BASE_IMPL(feature, env) \
00183       (((woden_feature_t *) feature)->ops->get_base_impl(feature, env))
00184 
00185 #define WODEN_FEATURE_GET_REF(feature, env) \
00186       (((woden_feature_t *) feature)->\
00187          get_ref(feature, env))
00188 
00189 #define WODEN_FEATURE_IS_REQUIRED(feature, env) \
00190       (((woden_feature_t *) feature)->\
00191          is_required(feature, env))
00192 
00193 #define WODEN_FEATURE_GET_PARENT(feature, env) \
00194       (((woden_feature_t *) feature)->ops->\
00195          get_parent(feature, env))
00196 
00197 #define WODEN_FEATURE_TO_ELEMENT(feature, env) \
00198       (((woden_feature_t *) feature)->ops->\
00199          to_element(feature, env))
00200 
00202 #ifdef __cplusplus
00203 }
00204 #endif
00205 #endif /* WODEN_FEATURE_H */

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