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

Generated on Thu Aug 31 17:32:37 2006 for Axis2/C by  doxygen 1.4.6