woden_property_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_PROPERTY_ELEMENT_H
00018 #define WODEN_PROPERTY_ELEMENT_H
00019 
00036 #include <axis2_allocator.h>
00037 #include <axis2_env.h>
00038 #include <axis2_error.h>
00039 #include <axis2_string.h>
00040 #include <axis2_utils.h>
00041 #include <axis2_hash.h>
00042 #include <axis2_qname.h>
00043 #include <axis2_generic_obj.h>
00044 #include <axis2_uri.h>
00045 #include <woden.h>
00046 #include <woden_documentable_element.h>
00047 #include <woden_nested_element.h>
00048 #include <woden.h>
00049 
00050 #ifdef __cplusplus
00051 extern "C"
00052 {
00053 #endif
00054 
00055 typedef struct woden_property_element woden_property_element_t;
00056 typedef struct woden_property_element_ops woden_property_element_ops_t;
00057 typedef union woden_property_element_base woden_property_element_base_t;
00058 struct xml_schema_type;
00059 
00065 struct woden_property_element_ops
00066 {
00071     axis2_status_t (AXIS2_CALL *
00072     free) (
00073             void *doc_el,
00074             const axis2_env_t *env);
00075     
00076     woden_obj_types_t (AXIS2_CALL *
00077     type) (
00078             void *doc_el,
00079             const axis2_env_t *env);
00080 
00081     axis2_status_t (AXIS2_CALL *
00082     set_ref) (void *doc_el,
00083             const axis2_env_t *env,
00084             axis2_uri_t *uri);
00085 
00086     axis2_uri_t *(AXIS2_CALL *
00087     get_ref) (void *doc_el,
00088             const axis2_env_t *env);
00089 
00090     axis2_status_t (AXIS2_CALL *
00091     set_value) (void *doc_el,
00092             const axis2_env_t *env,
00093             axis2_generic_obj_t *value);
00094 
00095     axis2_generic_obj_t *(AXIS2_CALL *
00096     get_value) (void *doc_el,
00097             const axis2_env_t *env);
00098 
00107     axis2_status_t (AXIS2_CALL *
00108     set_constraint_qname) (
00109             void *property_el,
00110             const axis2_env_t *env,
00111             axis2_qname_t *qname);
00112    
00113     axis2_qname_t *(AXIS2_CALL *
00114     get_constraint_qname) (
00115             void *property_el,
00116             const axis2_env_t *env);
00117 
00128     struct xml_schema_type *(AXIS2_CALL *
00129     get_constraint) (
00130             void *property_el,
00131             const axis2_env_t *env);
00132 
00140     axis2_status_t (AXIS2_CALL *
00141     set_has_value_token) (
00142             void *property_el,
00143             const axis2_env_t *env,
00144             axis2_bool_t b);
00145     
00152     axis2_bool_t (AXIS2_CALL * 
00153     has_value_token) (
00154             void *property_el,
00155             const axis2_env_t *env);
00156 
00157 };
00158 
00159 union woden_property_element_base
00160 {
00161     woden_documentable_element_t documentable_element;
00162     woden_nested_element_t nested_element;
00163 };
00164 
00165 struct woden_property_element
00166 {
00167     woden_property_element_base_t base;
00168     woden_property_element_ops_t *ops;
00169 };
00170 
00171 /************************Woden C Internal Methods*****************************/
00172 axis2_status_t AXIS2_CALL
00173 woden_property_element_resolve_methods(
00174         woden_property_element_t *property_element,
00175         const axis2_env_t *env,
00176         axis2_hash_t *methods);
00177 /************************End of Woden C Internal Methods***********************/
00178 
00179 #define WODEN_PROPERTY_ELEMENT_FREE(doc_el, env) \
00180       (((woden_property_element_t *) doc_el)->ops->\
00181          free (doc_el, env))
00182 
00183 #define WODEN_PROPERTY_ELEMENT_TYPE(doc_el, env) \
00184       (((woden_property_element_t *) doc_el)->ops->\
00185          type (doc_el, env))
00186 
00187 #define WODEN_PROPERTY_ELEMENT_SET_REF(doc_el, env, uri) \
00188       (((woden_property_element_t *) doc_el)->ops->\
00189          set_ref(doc_el, env, uri))
00190 
00191 #define WODEN_PROPERTY_ELEMENT_GET_REF(doc_el, env) \
00192       (((woden_property_element_t *) doc_el)->ops->\
00193          get_value(doc_el, env))
00194 
00195 #define WODEN_PROPERTY_ELEMENT_SET_VALUE(doc_el, env, value) \
00196       (((woden_property_element_t *) doc_el)->ops->\
00197          set_value(doc_el, env, value))
00198 
00199 #define WODEN_PROPERTY_ELEMENT_GET_VALUE(doc_el, env) \
00200       (((woden_property_element_t *) doc_el)->ops->\
00201          get_value(doc_el, env))
00202 
00203 
00204 #define WODEN_PROPERTY_ELEMENT_SET_CONSTRAINT_QNAME(doc_el, env, qname) \
00205       (((woden_property_element_t *) doc_el)->ops->\
00206          set_constraint_qname(doc_el, env, qname))
00207 
00208 #define WODEN_PROPERTY_ELEMENT_GET_CONSTRAINT_QNAME(doc_el, env) \
00209       (((woden_property_element_t *) doc_el)->ops->\
00210          get_constraint_qname(doc_el, env))
00211 
00212 #define WODEN_PROPERTY_ELEMENT_GET_CONSTRAINT(doc_el, env) \
00213       (((woden_property_element_t *) doc_el)->ops->\
00214          get_constraint(doc_el, env))
00215 
00216 #define WODEN_PROPERTY_ELEMENT_SET_HAS_VALUE_TOKEN(doc_el, env, b) \
00217       (((woden_property_element_t *) doc_el)->ops->\
00218          set_has_value_token(doc_el, env, b))
00219 
00220 #define WODEN_PROPERTY_ELEMENT_HAS_VALUE_TOKEN(doc_el, env) \
00221       (((woden_property_element_t *) doc_el)->ops->\
00222          has_value_token(doc_el, env))
00223 
00224 
00226 #ifdef __cplusplus
00227 }
00228 #endif
00229 #endif /* WODEN_PROPERTY_ELEMENT_H */

Generated on Thu Oct 26 21:00:12 2006 for Axis2/C by  doxygen 1.4.7