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

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