00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_RELATES_TO_H
00018 #define AXIS2_RELATES_TO_H
00019
00031 #include <axis2_defines.h>
00032 #include <axis2_env.h>
00033 #include <axis2_const.h>
00034
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039
00041 typedef struct axis2_relates_to axis2_relates_to_t;
00043 typedef struct axis2_relates_to_ops axis2_relates_to_ops_t;
00044
00045
00049 struct axis2_relates_to_ops
00050 {
00055 axis2_char_t *(AXIS2_CALL *
00056 get_value)(
00057 const axis2_relates_to_t *relates_to,
00058 const axis2_env_t *env);
00059
00066 axis2_status_t (AXIS2_CALL *
00067 set_value)(
00068 struct axis2_relates_to *relates_to,
00069 const axis2_env_t *env,
00070 axis2_char_t *value);
00071
00076 axis2_char_t *(AXIS2_CALL *
00077 get_relationship_type)(
00078 const axis2_relates_to_t *relates_to,
00079 const axis2_env_t *env);
00080
00087 axis2_status_t (AXIS2_CALL *
00088 set_relationship_type)(
00089 struct axis2_relates_to *relates_to,
00090 const axis2_env_t *env,
00091 axis2_char_t *relationship_type);
00092
00098 axis2_status_t (AXIS2_CALL *
00099 free)(
00100 struct axis2_relates_to *relates_to,
00101 const axis2_env_t *env);
00102 };
00103
00107 struct axis2_relates_to
00108 {
00110 axis2_relates_to_ops_t *ops;
00111 };
00112
00113
00120 AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
00121 axis2_relates_to_create(
00122 const axis2_env_t *env,
00123 const axis2_char_t *value,
00124 const axis2_char_t *relationship_type);
00125
00128 #define AXIS2_RELATES_TO_GET_VALUE(relates_to, env) \
00129 ((relates_to)->ops->get_value(relates_to, env))
00130
00133 #define AXIS2_RELATES_TO_SET_VALUE(relates_to, env, vlaue) \
00134 ((relates_to)->ops->set_value(relates_to, env, vlaue))
00135
00138 #define AXIS2_RELATES_TO_GET_RELATIONSHIP_TYPE(relates_to, env) \
00139 ((relates_to)->ops->get_relationship_type(relates_to, env))
00140
00143 #define AXIS2_RELATES_TO_SET_RELATIONSHIP_TYPE(relates_to, env, relationship_type) \
00144 ((relates_to)->ops->set_relationship_type(relates_to, env, relationship_type))
00145
00148 #define AXIS2_RELATES_TO_FREE(relates_to, env) \
00149 ((relates_to)->ops->free(relates_to, env))
00150
00153 #ifdef __cplusplus
00154 }
00155 #endif
00156
00157 #endif