woden_feature_element.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_ELEMENT_H
00018 #define WODEN_FEATURE_ELEMENT_H
00019 
00027 #include <axis2_allocator.h>
00028 #include <axis2_env.h>
00029 #include <axis2_error.h>
00030 #include <axis2_string.h>
00031 #include <axis2_utils.h>
00032 #include <axis2_hash.h>
00033 #include <axis2_qname.h>
00034 #include <axis2_uri.h>
00035 #include <woden.h>
00036 #include <woden_documentable_element.h>
00037 #include <woden_nested_element.h>
00038 
00039 #ifdef __cplusplus
00040 extern "C"
00041 {
00042 #endif
00043 
00044 typedef struct woden_feature_element woden_feature_element_t;
00045 typedef struct woden_feature_element_ops woden_feature_element_ops_t;
00046 typedef union woden_feature_element_base woden_feature_element_base_t;
00047 
00053 struct woden_feature_element_ops
00054 {
00059     axis2_status_t (AXIS2_CALL *
00060     free) (
00061             void *doc_el,
00062             const axis2_env_t *env);
00063     
00064     woden_obj_types_t (AXIS2_CALL *
00065     type) (void *doc_el,
00066             const axis2_env_t *env);
00067     
00068     axis2_status_t (AXIS2_CALL *
00069     set_ref) (void *doc_el,
00070             const axis2_env_t *env,
00071             axis2_uri_t *uri);
00072 
00073     axis2_uri_t *(AXIS2_CALL *
00074     get_ref) (void *doc_el,
00075             const axis2_env_t *env);
00076 
00077     axis2_status_t (AXIS2_CALL *
00078     set_required) (void *doc_el,
00079             const axis2_env_t *env,
00080             axis2_bool_t required);
00081 
00082     axis2_bool_t (AXIS2_CALL *
00083     is_required) (void *doc_el,
00084             const axis2_env_t *env);
00085 
00086 };
00087 
00088 union woden_feature_element_base
00089 {
00090     woden_documentable_element_t documentable_element;
00091     woden_nested_element_t nested_element;
00092 };
00093 
00094 struct woden_feature_element
00095 {
00096     woden_feature_element_base_t base;
00097     woden_feature_element_ops_t *ops;
00098 };
00099 
00100 /************************Woden C Internal Methods******************************/
00101 axis2_status_t AXIS2_CALL
00102 woden_feature_element_resolve_methods(
00103         woden_feature_element_t *feature_element,
00104         const axis2_env_t *env,
00105         axis2_hash_t *methods);
00106 /************************End of Woden C Internal Methods***********************/
00107 
00108 #define WODEN_FEATURE_ELEMENT_FREE(doc_el, env) \
00109       (((woden_feature_element_t *) doc_el)->ops->\
00110          free (doc_el, env))
00111 
00112 #define WODEN_FEATURE_ELEMENT_TYPE(doc_el, env) \
00113       (((woden_feature_element_t *) doc_el)->ops->\
00114          type (doc_el, env))
00115 
00116 #define WODEN_FEATURE_ELEMENT_SET_REF(doc_el, env, uri) \
00117       (((woden_feature_element_t *) doc_el)->ops->\
00118          set_ref(doc_el, env, uri))
00119 
00120 #define WODEN_FEATURE_ELEMENT_GET_REF(doc_el, env) \
00121       (((woden_feature_element_t *) doc_el)->ops->\
00122          get_ref(doc_el, env))
00123 
00124 #define WODEN_FEATURE_ELEMENT_SET_REQUIRED(doc_el, env, required) \
00125       (((woden_feature_element_t *) doc_el)->ops->\
00126          set_required(doc_el, env, required))
00127 
00128 #define WODEN_FEATURE_ELEMENT_IS_REQUIRED(doc_el, env) \
00129       (((woden_feature_element_t *) doc_el)->ops->\
00130          is_required(doc_el, env))
00131 
00133 #ifdef __cplusplus
00134 }
00135 #endif
00136 #endif /* WODEN_FEATURE_ELEMENT_H */

Generated on Thu Oct 26 21:11:24 2006 for Axis2/C by  doxygen 1.4.7