axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r331180 - in /webservices/axis2/trunk/c: include/axis2_phase_rule.h modules/core/description/src/phase_rule.c
Date Mon, 07 Nov 2005 02:43:52 GMT
Author: samisa
Date: Sun Nov  6 18:43:45 2005
New Revision: 331180

URL: http://svn.apache.org/viewcvs?rev=331180&view=rev
Log:
Added clone method

Modified:
    webservices/axis2/trunk/c/include/axis2_phase_rule.h
    webservices/axis2/trunk/c/modules/core/description/src/phase_rule.c

Modified: webservices/axis2/trunk/c/include/axis2_phase_rule.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_phase_rule.h?rev=331180&r1=331179&r2=331180&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phase_rule.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phase_rule.h Sun Nov  6 18:43:45 2005
@@ -24,7 +24,7 @@
 
 #include <axis2_defines.h>
 #include <axis2_qname.h>
-#include <axis2_parameter.h>
+#include <axis2_param.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -68,6 +68,8 @@
 
         axis2_status_t (AXIS2_CALL *free) (struct axis2_phase_rule *phase_rule, 
                                            axis2_env_t **env);
+        struct axis2_phase_rule* (AXIS2_CALL *clone) (struct axis2_phase_rule *phase_rule,

+                                           axis2_env_t **env);
     } axis2_phase_rule_ops_t;
 	
    /** 
@@ -91,11 +93,12 @@
 #define AXIS2_PHASE_RULE_SET_AFTER(phase_rule, env, after) ((phase_rule)->ops->set_after(phase_rule,
env, after))
 #define AXIS2_PHASE_RULE_GET_NAME(phase_rule, env) ((phase_rule)->ops->get_name(phase_rule,
env))
 #define AXIS2_PHASE_RULE_SET_NAME(phase_rule, env, name) ((phase_rule)->ops->set_name(phase_rule,
env, name))
-#define AXIS2_PHASE_RULE_IS_PHASE_FIRST(phase_rule, env) ((phase_rule)->ops->is_phase_first((phase_rule,
env))
-#define AXIS2_PHASE_RULE_GET_PHASE_FIRST(phase_rule, env, phase_first) ((phase_rule)->ops->set_phase_first(phase_rule,
env, phase_first))
+#define AXIS2_PHASE_RULE_IS_PHASE_FIRST(phase_rule, env) ((phase_rule)->ops->is_phase_first(phase_rule,
env))
+#define AXIS2_PHASE_RULE_SET_PHASE_FIRST(phase_rule, env, phase_first) ((phase_rule)->ops->set_phase_first(phase_rule,
env, phase_first))
 #define AXIS2_PHASE_RULE_IS_PHASE_LAST(phase_rule, env) ((phase_rule)->ops->is_phase_last(phase_rule,
env))
-#define AXIS2_PHASE_RULE_GET_PHASE_LAST(phase_rule, env, phase_last) ((phase_rule)->ops->set_phase_last(phase_rule,
env, phase_last))
+#define AXIS2_PHASE_RULE_SET_PHASE_LAST(phase_rule, env, phase_last) ((phase_rule)->ops->set_phase_last(phase_rule,
env, phase_last))
 #define AXIS2_PHASE_RULE_FREE(phase_rule, env) ((phase_rule)->ops->free(phase_rule,
env))
+#define AXIS2_PHASE_RULE_CLONE(phase_rule, env) ((phase_rule)->ops->clone(phase_rule,
env))
     
 /** @} */
     

Modified: webservices/axis2/trunk/c/modules/core/description/src/phase_rule.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/phase_rule.c?rev=331180&r1=331179&r2=331180&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/phase_rule.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/phase_rule.c Sun Nov  6 18:43:45
2005
@@ -60,6 +60,8 @@
                                        axis2_env_t **env, axis2_bool_t phae_last);
 axis2_status_t AXIS2_CALL axis2_phase_rule_free (struct axis2_phase_rule *phase_rule, 
                                    axis2_env_t **env);
+axis2_phase_rule_t*  AXIS2_CALL axis2_phase_rule_clone (struct axis2_phase_rule *phase_rule,

+                                   axis2_env_t **env);
 
 axis2_phase_rule_t* AXIS2_CALL axis2_phase_rule_create(axis2_env_t **env, axis2_char_t *name)
 {
@@ -108,6 +110,7 @@
     phase_rule_impl->phase_rule.ops->is_phase_last = axis2_phase_rule_is_phase_last;
     phase_rule_impl->phase_rule.ops->set_phase_last = axis2_phase_rule_set_phase_last;
     phase_rule_impl->phase_rule.ops->free = axis2_phase_rule_free;
+    phase_rule_impl->phase_rule.ops->clone = axis2_phase_rule_clone;
 
     return &(phase_rule_impl->phase_rule);
 }
@@ -115,7 +118,7 @@
 axis2_char_t* AXIS2_CALL axis2_phase_rule_get_before (struct axis2_phase_rule *phase_rule,

                                        axis2_env_t **env)
 {
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, NULL);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, NULL);
     return AXIS2_INTF_TO_IMPL(phase_rule)->before;
 }
 
@@ -124,7 +127,7 @@
 {
     axis2_phase_rule_impl_t *phase_rule_impl = NULL;
     
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     
     phase_rule_impl = AXIS2_INTF_TO_IMPL(phase_rule);
     if (phase_rule_impl->before)
@@ -150,7 +153,7 @@
 axis2_char_t* AXIS2_CALL axis2_phase_rule_get_after (struct axis2_phase_rule * phase_rule,

                                        axis2_env_t **env)
 {
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, NULL);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, NULL);
     return AXIS2_INTF_TO_IMPL(phase_rule)->after;
 }
 
@@ -159,7 +162,7 @@
 {
     axis2_phase_rule_impl_t *phase_rule_impl = NULL;
     
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     
     phase_rule_impl = AXIS2_INTF_TO_IMPL(phase_rule);
     if (phase_rule_impl->after)
@@ -185,7 +188,7 @@
 axis2_char_t* AXIS2_CALL axis2_phase_rule_get_name (struct axis2_phase_rule * phase_rule,

                                        axis2_env_t **env)
 {
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, NULL);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, NULL);
     return AXIS2_INTF_TO_IMPL(phase_rule)->name;
 }
 
@@ -194,7 +197,7 @@
 {
     axis2_phase_rule_impl_t *phase_rule_impl = NULL;
     
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     
     phase_rule_impl = AXIS2_INTF_TO_IMPL(phase_rule);
     if (phase_rule_impl->name)
@@ -221,14 +224,14 @@
 axis2_bool_t AXIS2_CALL axis2_phase_rule_is_phase_first (struct axis2_phase_rule * phase_rule,

                                        axis2_env_t **env)
 {
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     return AXIS2_INTF_TO_IMPL(phase_rule)->phase_first;
 }
 
 axis2_status_t AXIS2_CALL axis2_phase_rule_set_phase_first (struct axis2_phase_rule * phase_rule,

                                        axis2_env_t **env, axis2_bool_t phase_first)
 {
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(phase_rule)->phase_first = phase_first;
     return AXIS2_SUCCESS;
 }
@@ -236,14 +239,14 @@
 axis2_bool_t AXIS2_CALL axis2_phase_rule_is_phase_last (struct axis2_phase_rule * phase_rule,

                                        axis2_env_t **env)
 {
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     return AXIS2_INTF_TO_IMPL(phase_rule)->phase_last;
 }
 
 axis2_status_t AXIS2_CALL axis2_phase_rule_set_phase_last (struct axis2_phase_rule * phase_rule,

                                        axis2_env_t **env, axis2_bool_t phase_last)
 {
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(phase_rule)->phase_last = phase_last;
     return AXIS2_SUCCESS;
 }
@@ -254,7 +257,7 @@
 {
     axis2_phase_rule_impl_t *phase_rule_impl = NULL;
     
-    AXIS2_FUNC_PARAMETER_CHECK(phase_rule, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, AXIS2_FAILURE);
     
     phase_rule_impl = AXIS2_INTF_TO_IMPL(phase_rule);
     
@@ -286,4 +289,21 @@
     phase_rule_impl = NULL;
     
     return AXIS2_SUCCESS;
+}
+
+axis2_phase_rule_t*  AXIS2_CALL axis2_phase_rule_clone (struct axis2_phase_rule *phase_rule,

+                                   axis2_env_t **env)
+{
+    axis2_phase_rule_t *phase_rule_new = NULL;
+    AXIS2_FUNC_PARAM_CHECK(phase_rule, env, NULL);
+    
+    phase_rule_new = axis2_phase_rule_create(env, NULL);
+    if (!phase_rule_new)
+        return NULL;
+    AXIS2_PHASE_RULE_SET_BEFORE(phase_rule_new, env, AXIS2_PHASE_RULE_GET_BEFORE(phase_rule,
env));
+    AXIS2_PHASE_RULE_SET_AFTER(phase_rule_new, env, AXIS2_PHASE_RULE_GET_AFTER(phase_rule,
env));
+    AXIS2_PHASE_RULE_SET_NAME(phase_rule_new, env, AXIS2_PHASE_RULE_GET_NAME(phase_rule,
env));
+    AXIS2_PHASE_RULE_SET_PHASE_FIRST(phase_rule_new, env, AXIS2_PHASE_RULE_IS_PHASE_FIRST(phase_rule,
env) );
+    AXIS2_PHASE_RULE_SET_PHASE_LAST(phase_rule_new, env, AXIS2_PHASE_RULE_IS_PHASE_LAST(phase_rule,
env) );
+    return phase_rule_new;
 }



Mime
View raw message