00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_PROPERTY_H
00019 #define AXIS2_PROPERTY_H
00020
00021 #include <axis2_utils_defines.h>
00022 #include <axis2_error.h>
00023 #include <axis2_env.h>
00024 #include <axis2_utils.h>
00025
00026
00027 #ifdef __cplusplus
00028 extern "C"
00029 {
00030 #endif
00031
00032 typedef struct axis2_property axis2_property_t;
00033 typedef struct axis2_property_ops axis2_property_ops_t;
00034
00045 struct axis2_property_ops
00046 {
00047
00048 axis2_status_t (AXIS2_CALL *
00049 free) (axis2_property_t *property,
00050 const axis2_env_t *env);
00051
00055 axis2_status_t (AXIS2_CALL *
00056 set_scope) (axis2_property_t *property,
00057 const axis2_env_t *env,
00058 axis2_scope_t scope);
00059
00060 axis2_status_t (AXIS2_CALL *
00061 set_free_func) (axis2_property_t *property,
00062 const axis2_env_t *env,
00063 AXIS2_FREE_VOID_ARG free_func);
00064
00065 axis2_status_t (AXIS2_CALL *
00066 set_value) (axis2_property_t *property,
00067 const axis2_env_t *env,
00068 void *value);
00069 void *(AXIS2_CALL *
00070 get_value) (axis2_property_t *property,
00071 const axis2_env_t *env);
00072
00073 axis2_property_t* (AXIS2_CALL *
00074 clone)(
00075 axis2_property_t *property,
00076 const axis2_env_t *env);
00077
00078 };
00079
00080
00084 struct axis2_property
00085 {
00086 axis2_property_ops_t *ops;
00087 };
00088
00093 AXIS2_EXTERN axis2_property_t * AXIS2_CALL
00094 axis2_property_create(
00095 const axis2_env_t *env);
00096
00110 AXIS2_EXTERN axis2_property_t * AXIS2_CALL
00111 axis2_property_create_with_args(
00112 const axis2_env_t *env,
00113 axis2_scope_t scope,
00114 AXIS2_FREE_VOID_ARG free_func,
00115 void *value);
00116
00117
00118
00119 #define AXIS2_PROPERTY_FREE(property, env) \
00120 ((property)->ops->free (property, env))
00121
00122 #define AXIS2_PROPERTY_SET_FREE_FUNC(property, env, free_func) \
00123 ((property)->ops->set_free_func (property, env, free_func))
00124
00125 #define AXIS2_PROPERTY_SET_SCOPE(property, env, scope) \
00126 ((property)->ops->set_scope (property, env, scope))
00127
00128 #define AXIS2_PROPERTY_SET_VALUE(property, env, value) \
00129 ((property)->ops->set_value (property, env, value))
00130
00131 #define AXIS2_PROPERTY_GET_VALUE(property, env) \
00132 ((property)->ops->get_value(property, env))
00133
00134 #define AXIS2_PROPERTY_CLONE(property, env) \
00135 ((property)->ops->clone(property, env))
00136
00137
00138
00139
00140
00143 #ifdef __cplusplus
00144 }
00145 #endif
00146
00147 #endif