00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_RELATES_TO_H
00019 #define AXIS2_RELATES_TO_H
00020
00021
00038 #include <axis2_defines.h>
00039 #include <axis2_env.h>
00040 #include <axis2_const.h>
00041
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046
00048 typedef struct axis2_relates_to axis2_relates_to_t;
00050 typedef struct axis2_relates_to_ops axis2_relates_to_ops_t;
00051
00052
00056 struct axis2_relates_to_ops
00057 {
00065 const axis2_char_t *(AXIS2_CALL *
00066 get_value)(
00067 const axis2_relates_to_t *relates_to,
00068 const axis2_env_t *env);
00069
00078 axis2_status_t (AXIS2_CALL *
00079 set_value)(
00080 struct axis2_relates_to *relates_to,
00081 const axis2_env_t *env,
00082 const axis2_char_t *value);
00083
00090 const axis2_char_t *(AXIS2_CALL *
00091 get_relationship_type)(
00092 const axis2_relates_to_t *relates_to,
00093 const axis2_env_t *env);
00094
00102 axis2_status_t (AXIS2_CALL *
00103 set_relationship_type)(
00104 struct axis2_relates_to *relates_to,
00105 const axis2_env_t *env,
00106 const axis2_char_t *relationship_type);
00107
00114 axis2_status_t (AXIS2_CALL *
00115 free)(
00116 struct axis2_relates_to *relates_to,
00117 const axis2_env_t *env);
00118 };
00119
00123 struct axis2_relates_to
00124 {
00126 axis2_relates_to_ops_t *ops;
00127 };
00128
00129
00136 AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
00137 axis2_relates_to_create(
00138 const axis2_env_t *env,
00139 const axis2_char_t *value,
00140 const axis2_char_t *relationship_type);
00141
00144 #define AXIS2_RELATES_TO_GET_VALUE(relates_to, env) \
00145 ((relates_to)->ops->get_value(relates_to, env))
00146
00149 #define AXIS2_RELATES_TO_SET_VALUE(relates_to, env, vlaue) \
00150 ((relates_to)->ops->set_value(relates_to, env, vlaue))
00151
00154 #define AXIS2_RELATES_TO_GET_RELATIONSHIP_TYPE(relates_to, env) \
00155 ((relates_to)->ops->get_relationship_type(relates_to, env))
00156
00159 #define AXIS2_RELATES_TO_SET_RELATIONSHIP_TYPE(relates_to, env, relationship_type) \
00160 ((relates_to)->ops->set_relationship_type(relates_to, env, relationship_type))
00161
00164 #define AXIS2_RELATES_TO_FREE(relates_to, env) \
00165 ((relates_to)->ops->free(relates_to, env))
00166
00169 #ifdef __cplusplus
00170 }
00171 #endif
00172
00173 #endif