axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r491530 [1/4] - in /webservices/axis2/trunk/c: axiom/include/ axiom/src/om/ modules/core/deployment/
Date Mon, 01 Jan 2007 04:16:56 GMT
Author: samisa
Date: Sun Dec 31 20:16:53 2006
New Revision: 491530

URL: http://svn.apache.org/viewvc?view=rev&rev=491530
Log:
removed dynamic allocation of ops struct and did static allocation.
Also dropped the use of ops struct function pointers for operation that do not requires inheritance

Modified:
    webservices/axis2/trunk/c/axiom/include/axiom_attribute.h
    webservices/axis2/trunk/c/axiom/include/axiom_children_iterator.h
    webservices/axis2/trunk/c/axiom/include/axiom_children_qname_iterator.h
    webservices/axis2/trunk/c/axiom/include/axiom_comment.h
    webservices/axis2/trunk/c/axiom/include/axiom_doctype.h
    webservices/axis2/trunk/c/axiom/include/axiom_document.h
    webservices/axis2/trunk/c/axiom/include/axiom_element.h
    webservices/axis2/trunk/c/axiom/include/axiom_namespace.h
    webservices/axis2/trunk/c/axiom/include/axiom_navigator.h
    webservices/axis2/trunk/c/axiom/include/axiom_node.h
    webservices/axis2/trunk/c/axiom/include/axiom_output.h
    webservices/axis2/trunk/c/axiom/include/axiom_processing_instruction.h
    webservices/axis2/trunk/c/axiom/include/axiom_stax_builder.h
    webservices/axis2/trunk/c/axiom/include/axiom_text.h
    webservices/axis2/trunk/c/axiom/src/om/om_attribute.c
    webservices/axis2/trunk/c/axiom/src/om/om_children_iterator.c
    webservices/axis2/trunk/c/axiom/src/om/om_children_qname_iterator.c
    webservices/axis2/trunk/c/axiom/src/om/om_comment.c
    webservices/axis2/trunk/c/axiom/src/om/om_doctype.c
    webservices/axis2/trunk/c/axiom/src/om/om_document.c
    webservices/axis2/trunk/c/axiom/src/om/om_element.c
    webservices/axis2/trunk/c/axiom/src/om/om_namespace.c
    webservices/axis2/trunk/c/axiom/src/om/om_navigator.c
    webservices/axis2/trunk/c/axiom/src/om/om_node.c
    webservices/axis2/trunk/c/axiom/src/om/om_output.c
    webservices/axis2/trunk/c/axiom/src/om/om_processing_instruction.c
    webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
    webservices/axis2/trunk/c/axiom/src/om/om_text.c
    webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c

Modified: webservices/axis2/trunk/c/axiom/include/axiom_attribute.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_attribute.h?view=diff&rev=491530&r1=491529&r2=491530
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_attribute.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_attribute.h Sun Dec 31 20:16:53 2006
@@ -47,117 +47,6 @@
  */
     typedef struct axiom_attribute_ops
     {
-      /**
-        * Free an axiom_attribute struct
-        * @param  om_attribute pointer to attribute struct to be freed
-        * @param  env Environment. MUST NOT be NULL
-        * @return satus of the op. AXIS2_SUCCESS on success 
-        *         else AXIS2_FAILURE
-        */
-
-        axis2_status_t (AXIS2_CALL *
-        free)(struct axiom_attribute *om_attribute,
-              const axis2_env_t *env);
-
-      /** 
-        * Creates and returns a qname struct for this attribute
-        * @param om_attribute pointer to attribute struct 
-        *        for which the qname is to be returned
-        * @param env Environment. MUST NOT be NULL
-        * @return returns qname for given attribute.NULL on error 
-        */
-
-        axis2_qname_t * (AXIS2_CALL *
-        get_qname)(struct axiom_attribute *om_attribute,
-                   const axis2_env_t *env);
-
-      /**
-        * Serialize op
-        * @param om_attribute pointer to attribute struct to be serialized
-        * @param env Environment. MUST NOT be NULL,
-        * @param om_output AXIOM output handler to be used in serializing
-        * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.
-        */
-
-        int (AXIS2_CALL *
-        serialize)(struct axiom_attribute *om_attribute,
-                   const axis2_env_t *env,
-                   axiom_output_t *om_output);
-       
-       /**  returns the localname of this attribute
-        *@param om_attribute pointer to attribute struct 
-        *@param env environment. MUST NOT not be NULL.
-        *@return localname returns NULL on error.
-        */
-        axis2_char_t* (AXIS2_CALL *
-        get_localname)(struct axiom_attribute *om_attribute,
-                       const axis2_env_t *env);
-       /**
-        * returns value of this attribute 
-        *@param om_attribute pointer to om_attribute struct 
-        *@param env environment N not be null
-        *@return value , null on error
-        */
-        axis2_char_t* (AXIS2_CALL *
-        get_value)(struct axiom_attribute *om_attribute,
-                   const axis2_env_t *env);
-       /**
-        * returns namespace of this attribute 
-        *@param om_attribute
-        *@param env environment MUST NOT be NULL
-        *@return a pointer to om_namespace struct , returns NULL on error.
-        */
-        axiom_namespace_t* (AXIS2_CALL *
-        get_namespace)(struct axiom_attribute *om_attribute,
-                       const axis2_env_t *env);
-       
-       /** sets the localname of the attribute
-        *@param om_attribute pointer to om attribute struct. 
-        *@param env environment, MUST NOT be null.
-        *@param localname localname that should be set for this attribute 
-        *@return status code AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
-        */
-        axis2_status_t (AXIS2_CALL *
-        set_localname)(struct axiom_attribute *om_attribute,
-                       const axis2_env_t *env,
-                       const axis2_char_t *localname);
-       
-       /** set the attribute value
-        *@param om_attribute a pointer to om_attribute struct.
-        *@param env environment, MUST NOT be NULL.
-        *@param value value that should be set for this attribute 
-        *@return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
-        */
-        
-        axis2_status_t (AXIS2_CALL *
-        set_value)(struct axiom_attribute *om_attribute,
-                   const axis2_env_t *env,
-                   const axis2_char_t *value);
-       
-       /** set namespace of the attribute
-        *@param om_attribute a pointer to om_attribute struct  
-        *@param env environment, MUST NOT be NULL.
-        *@param om_namespace a pointer to om_namespace struct that should be set 
-        *                    for this attribute 
-        *@return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
-        */
-        axis2_status_t (AXIS2_CALL *
-        set_namespace)(struct axiom_attribute *om_attribute,
-                       const axis2_env_t *env,
-                       axiom_namespace_t *om_namespace);
-
-        /**
-         * clones an om attribute
-         * @param om_attibute 
-         * @param env environment
-         * @returns pointer to cloned om attribute struct on success
-         * NULL otherwise
-         */            
-        struct axiom_attribute* (AXIS2_CALL *
-        clone)(struct axiom_attribute *om_attribute,
-               const axis2_env_t *env);
-
-
     } axiom_attribute_ops_t;
 
   /**
@@ -167,7 +56,7 @@
     typedef struct axiom_attribute
     {
         /** ops of attribute struct */
-	  axiom_attribute_ops_t *ops;
+	  const axiom_attribute_ops_t *ops;
 	  int ref;
        
     } axiom_attribute_t;
@@ -196,41 +85,153 @@
             void *om_attribute,
             const axis2_env_t *env);
      
+  /**
+    * Free an axiom_attribute struct
+    * @param  om_attribute pointer to attribute struct to be freed
+    * @param  env Environment. MUST NOT be NULL
+    * @return satus of the op. AXIS2_SUCCESS on success 
+    *         else AXIS2_FAILURE
+    */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_attribute_free(struct axiom_attribute *om_attribute,
+          const axis2_env_t *env);
+
+  /** 
+    * Creates and returns a qname struct for this attribute
+    * @param om_attribute pointer to attribute struct 
+    *        for which the qname is to be returned
+    * @param env Environment. MUST NOT be NULL
+    * @return returns qname for given attribute.NULL on error 
+    */
+
+    AXIS2_EXTERN axis2_qname_t * AXIS2_CALL 
+    axiom_attribute_get_qname(struct axiom_attribute *om_attribute,
+               const axis2_env_t *env);
+
+  /**
+    * Serialize op
+    * @param om_attribute pointer to attribute struct to be serialized
+    * @param env Environment. MUST NOT be NULL,
+    * @param om_output AXIOM output handler to be used in serializing
+    * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.
+    */
+
+    AXIS2_EXTERN int AXIS2_CALL 
+    axiom_attribute_serialize(struct axiom_attribute *om_attribute,
+               const axis2_env_t *env,
+               axiom_output_t *om_output);
+   
+   /**  returns the localname of this attribute
+    *@param om_attribute pointer to attribute struct 
+    *@param env environment. MUST NOT not be NULL.
+    *@return localname returns NULL on error.
+    */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL 
+    axiom_attribute_get_localname(struct axiom_attribute *om_attribute,
+                   const axis2_env_t *env);
+   /**
+    * returns value of this attribute 
+    *@param om_attribute pointer to om_attribute struct 
+    *@param env environment N not be null
+    *@return value , null on error
+    */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL 
+    axiom_attribute_get_value(struct axiom_attribute *om_attribute,
+               const axis2_env_t *env);
+   /**
+    * returns namespace of this attribute 
+    *@param om_attribute
+    *@param env environment MUST NOT be NULL
+    *@return a pointer to om_namespace struct , returns NULL on error.
+    */
+    AXIS2_EXTERN axiom_namespace_t* AXIS2_CALL 
+    axiom_attribute_get_namespace(struct axiom_attribute *om_attribute,
+                   const axis2_env_t *env);
+   
+   /** sets the localname of the attribute
+    *@param om_attribute pointer to om attribute struct. 
+    *@param env environment, MUST NOT be null.
+    *@param localname localname that should be set for this attribute 
+    *@return status code AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_attribute_set_localname(struct axiom_attribute *om_attribute,
+                   const axis2_env_t *env,
+                   const axis2_char_t *localname);
+   
+   /** set the attribute value
+    *@param om_attribute a pointer to om_attribute struct.
+    *@param env environment, MUST NOT be NULL.
+    *@param value value that should be set for this attribute 
+    *@return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+    */
+    
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_attribute_set_value(struct axiom_attribute *om_attribute,
+               const axis2_env_t *env,
+               const axis2_char_t *value);
+   
+   /** set namespace of the attribute
+    *@param om_attribute a pointer to om_attribute struct  
+    *@param env environment, MUST NOT be NULL.
+    *@param om_namespace a pointer to om_namespace struct that should be set 
+    *                    for this attribute 
+    *@return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_attribute_set_namespace(struct axiom_attribute *om_attribute,
+                   const axis2_env_t *env,
+                   axiom_namespace_t *om_namespace);
+
+    /**
+     * clones an om attribute
+     * @param om_attibute 
+     * @param env environment
+     * @returns pointer to cloned om attribute struct on success
+     * NULL otherwise
+     */            
+    AXIS2_EXTERN struct axiom_attribute* AXIS2_CALL 
+    axiom_attribute_clone(struct axiom_attribute *om_attribute,
+           const axis2_env_t *env);
+
+
+     
 /******************** Macros **************************************************/
     
     
 /** free given attribute */
 #define AXIOM_ATTRIBUTE_FREE(om_attribute, env) \
-        ((om_attribute)->ops->free(om_attribute, env))
+        axiom_attribute_free(om_attribute, env)
         
 /** get qname of given attribute */
 #define AXIOM_ATTRIBUTE_GET_QNAME(om_attribute,env) \
-        ((om_attribute)->ops->get_qname(om_attribute, env))
+        axiom_attribute_get_qname(om_attribute, env)
         
 /** serialize given attribute */
 #define AXIOM_ATTRIBUTE_SERIALIZE(om_attribute, env, om_ouput) \
-        ((om_attribute)->ops->serialize(om_attribute, env, om_output))
+        axiom_attribute_serialize(om_attribute, env, om_output)
 /** get namespace of an the attribute */        
 #define AXIOM_ATTRIBUTE_GET_NAMESPACE(om_attribute, env) \
-        ((om_attribute)->ops->get_namespace(om_attribute, env))
+        axiom_attribute_get_namespace(om_attribute, env)
 /** get attribute localname */
 #define AXIOM_ATTRIBUTE_GET_LOCALNAME(om_attribute, env) \
-        ((om_attribute)->ops->get_localname(om_attribute, env))
+        axiom_attribute_get_localname(om_attribute, env)
 /** grt value of attribute */        
 #define AXIOM_ATTRIBUTE_GET_VALUE(om_attribute, env) \
-        ((om_attribute)->ops->get_value(om_attribute, env))
+        axiom_attribute_get_value(om_attribute, env)
 /** set namespace for this attribute */               
 #define AXIOM_ATTRIBUTE_SET_NAMESPACE(om_attribute, env,ns) \
-        ((om_attribute)->ops->set_namespace(om_attribute, env,ns))
+        axiom_attribute_set_namespace(om_attribute, env,ns)
 /** set localname for this attribute */        
 #define AXIOM_ATTRIBUTE_SET_LOCALNAME(om_attribute, env,localname) \
-        ((om_attribute)->ops->set_localname(om_attribute, env,localname))
+        axiom_attribute_set_localname(om_attribute, env,localname)
 /** set attribue value */
 #define AXIOM_ATTRIBUTE_SET_VALUE(om_attribute, env,value) \
-        ((om_attribute)->ops->set_value(om_attribute, env,value))
+        axiom_attribute_set_value(om_attribute, env,value)
 
 #define AXIOM_ATTRIBUTE_CLONE(om_attribute, env) \
-        ((om_attribute)->ops->clone(om_attribute, env))
+        axiom_attribute_clone(om_attribute, env)
 /** @} */
 
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/axiom/include/axiom_children_iterator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_children_iterator.h?view=diff&rev=491530&r1=491529&r2=491530
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_children_iterator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_children_iterator.h Sun Dec 31 20:16:53
2006
@@ -47,85 +47,87 @@
     */
      struct axiom_children_iterator_ops
     {
-      /**
-       * Free the om_children_iterator struct
-       */
-        axis2_status_t (AXIS2_CALL *
-      free_fn)(axiom_children_iterator_t *iterator,
-                 const axis2_env_t *env);
-                             
-        /**
-        * Removes from the underlying collection the last element returned by the
-        * iterator (optional op).  This method can be called only once per
-        * call to <tt>next</tt>.  The behavior of an iterator is unspecified
if
-        * the underlying collection is modified while the iteration is in
-        * progress in any way other than by calling this method.
-        */                                              
-        axis2_status_t (AXIS2_CALL *
-      remove)(axiom_children_iterator_t *iterator,
-                const axis2_env_t *env);
-                             
-       /**
-        * @returns true if the iteration has more elements. In other
-        * words, returns true if next() would return an om_node_t struct 
-        * rather than null with error code set in environment
-        */                             
-        
-        axis2_bool_t (AXIS2_CALL *
-      has_next)(axiom_children_iterator_t *iterator,
-                  const axis2_env_t *env);
-    
-       /**
-        * Returns the next element in the iteration. Returns null if there are
-      * no more elements in the iteration
-        */
-        axiom_node_t* (AXIS2_CALL *
-      next)(axiom_children_iterator_t *iterator,
-              const axis2_env_t *env);
-
-        /**
-         * Resets the Iterator. This moves the cursor back to the initial.
-         * iterator chidren_iterator to be reset.
-         * @param env Environment. MUST NOT be NULL.
-         * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.
-         */
-        axis2_status_t (AXIS2_CALL *
-        reset)(axiom_children_iterator_t *iterator,
-                          const axis2_env_t *env);
     };
     
     
-struct axiom_children_iterator
-{
-    axiom_children_iterator_ops_t *ops;
-};    
-
-/** 
- * @param current child
- * @param env environment 
- * return axiom_children_iterator_t 
- */
+    struct axiom_children_iterator
+    {
+        const axiom_children_iterator_ops_t *ops;
+    };    
+
+    /** 
+     * @param current child
+     * @param env environment 
+     * return axiom_children_iterator_t 
+     */
 
-AXIS2_EXTERN  axiom_children_iterator_t * AXIS2_CALL
-axiom_children_iterator_create(const axis2_env_t *env, 
+    AXIS2_EXTERN  axiom_children_iterator_t * AXIS2_CALL
+    axiom_children_iterator_create(const axis2_env_t *env, 
                                   axiom_node_t *current_child);
+
+   /**
+   * Free the om_children_iterator struct
+   */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_children_iterator_free(axiom_children_iterator_t *iterator,
+             const axis2_env_t *env);
+                         
+    /**
+    * Removes from the underlying collection the last element returned by the
+    * iterator (optional op).  This method can be called only once per
+    * call to <tt>next</tt>.  The behavior of an iterator is unspecified if
+    * the underlying collection is modified while the iteration is in
+    * progress in any way other than by calling this method.
+    */                                              
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_children_iterator_remove(axiom_children_iterator_t *iterator,
+            const axis2_env_t *env);
+                         
+   /**
+    * @returns true if the iteration has more elements. In other
+    * words, returns true if next() would return an om_node_t struct 
+    * rather than null with error code set in environment
+    */                             
+    
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
+    axiom_children_iterator_has_next(axiom_children_iterator_t *iterator,
+              const axis2_env_t *env);
+
+   /**
+    * Returns the next element in the iteration. Returns null if there are
+  * no more elements in the iteration
+    */
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
+    axiom_children_iterator_next(axiom_children_iterator_t *iterator,
+          const axis2_env_t *env);
+
+    /**
+     * Resets the Iterator. This moves the cursor back to the initial.
+     * iterator chidren_iterator to be reset.
+     * @param env Environment. MUST NOT be NULL.
+     * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_children_iterator_reset(axiom_children_iterator_t *iterator,
+                      const axis2_env_t *env);
+                             
                                   
 /************ Macros *********************************************/
 
 #define AXIOM_CHILDREN_ITERATOR_FREE(iterator, env) \
-        ((iterator)->ops->free_fn(iterator, env))
+        axiom_children_iterator_free(iterator, env)
 
 #define AXIOM_CHILDREN_ITERATOR_REMOVE(iterator, env) \
-        ((iterator)->ops->remove(iterator, env))
+        axiom_children_iterator_remove(iterator, env)
         
 #define AXIOM_CHILDREN_ITERATOR_HAS_NEXT(iterator, env) \
-        ((iterator)->ops->has_next(iterator, env))
+        axiom_children_iterator_has_next(iterator, env)
         
 #define AXIOM_CHILDREN_ITERATOR_NEXT(iterator, env) \
-        ((iterator)->ops->next(iterator, env))        
+        axiom_children_iterator_next(iterator, env)
               
 #define AXIOM_CHILDREN_ITERATOR_RESET(iterator, env) \
-        ((iterator)->ops->reset(iterator, env))        
+        axiom_children_iterator_reset(iterator, env)
  /** @} */
 
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/axiom/include/axiom_children_qname_iterator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_children_qname_iterator.h?view=diff&rev=491530&r1=491529&r2=491530
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_children_qname_iterator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_children_qname_iterator.h Sun Dec 31 20:16:53
2006
@@ -49,67 +49,65 @@
 
      struct axiom_children_qname_iterator_ops
     {
-      /**
-       * free om_children_qname_iterator struct 
-       */
-        axis2_status_t (AXIS2_CALL *
-      free_fn)(axiom_children_qname_iterator_t *iterator,
-                 const axis2_env_t *env);
-                             
-        /**
-        * Removes from the underlying collection the last element returned by the
-        * iterator (optional operation).  This method can be called only once per
-        * call to <tt>next</tt>.  The behavior of an iterator is unspecified
if
-        * the underlying collection is modified while the iteration is in
-        * progress in any way other than by calling this method.
-        */                                              
-        axis2_status_t (AXIS2_CALL *
-      remove)(axiom_children_qname_iterator_t *iterator,
-                const axis2_env_t *env);
-                             
-       /**
-        * Returns <tt>true</tt> if the iteration has more elements. (In other
-        * words, returns <tt>true</tt> if <tt>next</tt> would return
an 
-      * axiom_node_t struct rather than null with error code set in environment
-        */                             
-        
-        axis2_bool_t (AXIS2_CALL *
-      has_next)(axiom_children_qname_iterator_t *iterator,
-                  const axis2_env_t *env);
+    };
+
+    struct axiom_children_qname_iterator
+    {
+        const axiom_children_qname_iterator_ops_t *ops;
+    };
+
+    AXIS2_EXTERN axiom_children_qname_iterator_t * AXIS2_CALL
+    axiom_children_qname_iterator_create(const axis2_env_t *env,
+                                            axiom_node_t *current_child,
+                                            axis2_qname_t *given_qname);
+
+   /**
+    * free om_children_qname_iterator struct 
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_children_qname_iterator_free(axiom_children_qname_iterator_t *iterator,
+             const axis2_env_t *env);
+                         
+   /**
+    * Removes from the underlying collection the last element returned by the
+    * iterator (optional operation).  This method can be called only once per
+    * call to <tt>next</tt>.  The behavior of an iterator is unspecified if
+    * the underlying collection is modified while the iteration is in
+    * progress in any way other than by calling this method.
+    */                                              
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_children_qname_iterator_remove(axiom_children_qname_iterator_t *iterator,
+            const axis2_env_t *env);
+                         
+   /**
+    * Returns <tt>true</tt> if the iteration has more elements. (In other
+    * words, returns <tt>true</tt> if <tt>next</tt> would return
an 
+    * axiom_node_t struct rather than null with error code set in environment
+    */                             
     
-       /**
-        * Returns the next element in the iteration.
-        */
-        axiom_node_t* (AXIS2_CALL *
-      next)(axiom_children_qname_iterator_t *iterator,
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
+    axiom_children_qname_iterator_has_next(axiom_children_qname_iterator_t *iterator,
               const axis2_env_t *env);
-                             
-                        
-        
-    };
 
-struct axiom_children_qname_iterator
-{
-    axiom_children_qname_iterator_ops_t *ops;
-};
-
-AXIS2_EXTERN axiom_children_qname_iterator_t * AXIS2_CALL
-axiom_children_qname_iterator_create(const axis2_env_t *env,
-                                        axiom_node_t *current_child,
-                                        axis2_qname_t *given_qname);
- 
+   /**
+    * Returns the next element in the iteration.
+    */
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
+    axiom_children_qname_iterator_next(axiom_children_qname_iterator_t *iterator,
+          const axis2_env_t *env);
+                         
 
 #define AXIOM_CHILDREN_QNAME_ITERATOR_FREE(iterator, env) \
-        ((iterator)->ops->free_fn(iterator, env))
+        axiom_children_qname_iterator_free(iterator, env)
 
 #define AXIOM_CHILDREN_QNAME_ITERATOR_REMOVE(iterator, env) \
-        ((iterator)->ops->remove(iterator, env))
+        axiom_children_qname_iterator_remove(iterator, env)
 
 #define AXIOM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(iterator, env) \
-        ((iterator)->ops->has_next(iterator, env))
+        axiom_children_qname_iterator_has_next(iterator, env)
 
 #define AXIOM_CHILDREN_QNAME_ITERATOR_NEXT(iterator, env) \
-        ((iterator)->ops->next(iterator, env))
+        axiom_children_qname_iterator_next(iterator, env)
 
 /** @} */
 

Modified: webservices/axis2/trunk/c/axiom/include/axiom_comment.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_comment.h?view=diff&rev=491530&r1=491529&r2=491530
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_comment.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_comment.h Sun Dec 31 20:16:53 2006
@@ -47,48 +47,7 @@
     */
    typedef struct axiom_comment_ops
     {
-      /**
-        * Free a axis2_comment_t struct
-        * @param om_comment pointer to axis2_commnet_t struct to be freed
-        * @param env Environment. MUST NOT be NULL.
-        * @return satus of the op. 
-        *                AXIS2_SUCCESS on success ,AXIS2_FAILURE on error.
-        */
-        axis2_status_t (AXIS2_CALL *
-        free) (struct axiom_comment *om_comment,
-               const axis2_env_t *env);
-       /** get the comments data
-        * @param om_comment a pointer to axiom_comment_t struct
-        * @param env environment, MUST NOT be NULL 
-        * @returns comment text
-        */
-               
-        axis2_char_t* (AXIS2_CALL *
-        get_value)(struct axiom_comment *om_comment,
-                   const axis2_env_t *env);
-       /**
-        * set comment data
-        * @param om_comment pointer to axiom_comment_t struct
-        * @param env environment, MUST NOT be NULL.
-        * @param value comment text
-        * @returns AXIS2_SUCCESS on success , AXIS2_FAILURE on error
-        */
-        axis2_status_t (AXIS2_CALL *
-        set_value)(struct axiom_comment *om_comment,
-                  const axis2_env_t *env,
-                  const axis2_char_t* value);
-        /**
-         *  serialize function 
-         *  @param om_comment pointer to axiom_comment_t struct
-         *  @param env environment, MUST NOT be NULL.
-         *  @param om_output pointer to om_output_t struct
-         *  @return AXIS2_SUCCESS on success, AXIS2_FAILURE on error.
-         */
-        axis2_status_t (AXIS2_CALL *
-        serialize)(struct axiom_comment *om_comment,
-                   const axis2_env_t *env,
-                   axiom_output_t *om_output);
-                                                                                        
   
+                                                                                        
  
                                               
     } axiom_comment_ops_t;
 
@@ -99,8 +58,7 @@
     typedef struct axiom_comment
     {
         /** ops struct */
-        axiom_comment_ops_t *ops;
-
+        const axiom_comment_ops_t *ops;
     } axiom_comment_t;
 
   /**
@@ -119,19 +77,60 @@
                              const axis2_char_t *value,
                              axiom_node_t **node);
 
-
+  /**
+    * Free a axis2_comment_t struct
+    * @param om_comment pointer to axis2_commnet_t struct to be freed
+    * @param env Environment. MUST NOT be NULL.
+    * @return satus of the op. 
+    *                AXIS2_SUCCESS on success ,AXIS2_FAILURE on error.
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_comment_free (struct axiom_comment *om_comment,
+           const axis2_env_t *env);
+   /** get the comments data
+    * @param om_comment a pointer to axiom_comment_t struct
+    * @param env environment, MUST NOT be NULL 
+    * @returns comment text
+    */
+           
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL 
+    axiom_comment_get_value(struct axiom_comment *om_comment,
+               const axis2_env_t *env);
+   /**
+    * set comment data
+    * @param om_comment pointer to axiom_comment_t struct
+    * @param env environment, MUST NOT be NULL.
+    * @param value comment text
+    * @returns AXIS2_SUCCESS on success , AXIS2_FAILURE on error
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_comment_set_value(struct axiom_comment *om_comment,
+              const axis2_env_t *env,
+              const axis2_char_t* value);
+    /**
+     *  serialize function 
+     *  @param om_comment pointer to axiom_comment_t struct
+     *  @param env environment, MUST NOT be NULL.
+     *  @param om_output pointer to om_output_t struct
+     *  @return AXIS2_SUCCESS on success, AXIS2_FAILURE on error.
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_comment_serialize(struct axiom_comment *om_comment,
+               const axis2_env_t *env,
+               axiom_output_t *om_output);
+ 
 /** free given comment */
 #define AXIOM_COMMENT_FREE(om_comment, env) \
-        ((om_comment)->ops->free(om_comment, env))
+        axiom_comment_free(om_comment, env)
 /** get comment text */
 #define AXIOM_COMMENT_GET_VALUE(om_comment, env) \
-        ((om_comment)->ops->get_value(om_comment, env))
+        axiom_comment_get_value(om_comment, env)
 /** set comment text */        
 #define AXIOM_COMMENT_SET_VALUE(om_comment, env, value) \
-        ((om_comment)->ops->set_value(om_comment, env, value))
+        axiom_comment_set_value(om_comment, env, value)
 /** serialize */
 #define AXIOM_COMMENT_SERIALIZE(om_comment, env, om_output) \
-        ((om_comment)->ops->serialize(om_comment, env, om_output))
+        axiom_comment_serialize(om_comment, env, om_output)
 
 /** @} */
 

Modified: webservices/axis2/trunk/c/axiom/include/axiom_doctype.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_doctype.h?view=diff&rev=491530&r1=491529&r2=491530
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_doctype.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_doctype.h Sun Dec 31 20:16:53 2006
@@ -46,50 +46,6 @@
     */
     typedef struct axiom_doctype_ops
     {
-      /**
-        * free doctype struct
-        * @param om_doctype pointer to axiom_doctype_t struct to be freed
-        * @param env Environment. MUST NOT be NULL,
-        * @return satus of the op. AXIS2_SUCCESS on success
-        *         AXIS2_FAILURE on error.
-        */
-        axis2_status_t (AXIS2_CALL *
-        free)(struct axiom_doctype *om_doctype,
-              const axis2_env_t *env);
-       /**
-        * @param om_doctype pointer to a axiom_doctype_t struct
-        * @param env environment must not be null       
-        * @return DTD text 
-        */
-        axis2_char_t* (AXIS2_CALL *
-        get_value)(struct axiom_doctype *om_doctype,
-                   const axis2_env_t *env);
-       /**
-        * @param om_doctype pointer to axiom doctype_t struct
-        * @param env environment , MUST NOT be NULL.
-        * @param value doctype text value
-        * @return status of the op,
-        *         AXIS2_SUCCESS on success, AXIS2_FAILURE on error.
-        */
-
-        axis2_status_t (AXIS2_CALL *
-        set_value)(struct axiom_doctype *om_doctype,
-                   const axis2_env_t *env,
-                   const axis2_char_t *value);
-       /**
-        * serialize op 
-        * @param om_doctype pointer to axiom_doctype_t struct
-        * @param env environment , MUST NOT be NULL
-        * @param om_output pointer to axiom_output_t struct
-        * @returns status of the op,
-        *          AXIS2_SUCCESS on success, AXIS2_FAILURE on error.
-        */                                   
-        
-        axis2_status_t (AXIS2_CALL *
-        serialize)(struct axiom_doctype *om_doctype,
-                   const axis2_env_t *env,
-                   axiom_output_t *om_output);
-                                                                                        
                                             
     } axiom_doctype_ops_t;
 
   /**
@@ -99,8 +55,7 @@
     typedef struct axiom_doctype
     {
         /** Doctype related ops */
-        axiom_doctype_ops_t *ops;
-
+        const axiom_doctype_ops_t *ops;
     } axiom_doctype_t;
 
   /**
@@ -118,19 +73,62 @@
                              axiom_node_t * parent,
                              const axis2_char_t * value,
                              axiom_node_t ** node);
+  /**
+    * free doctype struct
+    * @param om_doctype pointer to axiom_doctype_t struct to be freed
+    * @param env Environment. MUST NOT be NULL,
+    * @return satus of the op. AXIS2_SUCCESS on success
+    *         AXIS2_FAILURE on error.
+    */
+    axis2_status_t AXIS2_CALL 
+    axiom_doctype_free(struct axiom_doctype *om_doctype,
+          const axis2_env_t *env);
+   /**
+    * @param om_doctype pointer to a axiom_doctype_t struct
+    * @param env environment must not be null       
+    * @return DTD text 
+    */
+    axis2_char_t* AXIS2_CALL 
+    axiom_doctype_get_value(struct axiom_doctype *om_doctype,
+               const axis2_env_t *env);
+   /**
+    * @param om_doctype pointer to axiom doctype_t struct
+    * @param env environment , MUST NOT be NULL.
+    * @param value doctype text value
+    * @return status of the op,
+    *         AXIS2_SUCCESS on success, AXIS2_FAILURE on error.
+    */
 
+    axis2_status_t AXIS2_CALL 
+    axiom_doctype_set_value(struct axiom_doctype *om_doctype,
+               const axis2_env_t *env,
+               const axis2_char_t *value);
+   /**
+    * serialize op 
+    * @param om_doctype pointer to axiom_doctype_t struct
+    * @param env environment , MUST NOT be NULL
+    * @param om_output pointer to axiom_output_t struct
+    * @returns status of the op,
+    *          AXIS2_SUCCESS on success, AXIS2_FAILURE on error.
+    */                                   
+    
+    axis2_status_t AXIS2_CALL 
+    axiom_doctype_serialize(struct axiom_doctype *om_doctype,
+               const axis2_env_t *env,
+               axiom_output_t *om_output);
+ 
 /** free given doctype */    
 #define AXIOM_DOCTYPE_FREE(doctype, env) \
-        ((doctype)->ops->free(doctype, env))
+        axiom_doctype_free(doctype, env)
 /** returns the value of doctype */
 #define AXIOM_DOCTYPE_GET_VALUE(doctype, env) \
-        ((doctype)->ops->get_value(doctype, env))
+        axiom_doctype_get_value(doctype, env)
 /** set the doctype value */
 #define AXIOM_DOCTYPE_SET_VALUE(doctype, env, value) \
-        ((doctype)->ops->set_value(doctype, env, value))
+        axiom_doctype_set_value(doctype, env, value)
 /** serialize op */       
 #define AXIOM_DOCTYPE_SERIALIZE(doctype, env, om_output) \
-        ((doctype)->ops->serialize(doctype, env, om_output))
+        axiom_doctype_serialize(doctype, env, om_output)
 
 /** @} */
     

Modified: webservices/axis2/trunk/c/axiom/include/axiom_document.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_document.h?view=diff&rev=491530&r1=491529&r2=491530
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_document.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_document.h Sun Dec 31 20:16:53 2006
@@ -53,76 +53,6 @@
     */
     typedef struct axiom_document_ops
     {
-
-      /** 
-        * Free document struct
-        * @param document pointer to axiom_document_t struct to be freed
-        * @param env Environment. MUST NOT be NULL    
-        * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.
-        */
-        axis2_status_t (AXIS2_CALL *
-        free) (struct axiom_document *document,
-               const axis2_env_t *env);
-
-      /** Builds the next node if the builder is not finished with input xml stream
-        * @param document document whose next node is to be built. cannot be NULL
-        * @param env Environment. MUST NOT be NULL.        
-        * @return pointer to the next node. NULL on error.
-        */
-      
-      axiom_node_t* (AXIS2_CALL *
-      build_next) (struct axiom_document *document,
-                   const axis2_env_t *env);
-
-      /**
-        * Gets the root element of the document.
-        * @param document document to return the root of
-        * @param env Environment. MUST NOT be NULL.        
-        * @return returns a pointer to the root node. If no root present,
-        *            this method tries to build the root. Returns NULL on error. 
-        */
-        axiom_node_t* (AXIS2_CALL *
-        get_root_element)(struct axiom_document *document,
-                          const axis2_env_t *env);
-
-      /**
-        * set the root element of the document. IF a root node is already exist,it is freed

-        * before setting to root element 
-        * @param document document struct to return the root of
-        * @param env Environment. MUST NOT be NULL.        
-        * @return returns status code AXIS2_SUCCESS on success ,AXIS2_FAILURE on error. 
-        */        
-                                                        
-        axis2_status_t (AXIS2_CALL *
-        set_root_element)(struct axiom_document *document,
-                          const axis2_env_t *env,
-                          axiom_node_t *om_node);
-       /**
-        * This method builds the rest of the xml input stream from current position till
-        * the root element is completed .
-        *@param document pointer to axiom_document_t struct to be built.
-        *@param env environment MUST NOT be NULL.
-        */
-        axiom_node_t* (AXIS2_CALL *
-        build_all)(struct axiom_document *document,
-                   const axis2_env_t *env); 
-        /**
-         * get builder
-         * @return builder , returns NULL if a builder is not associated with 
-         *                   document
-         */
-        struct axiom_stax_builder* (AXIS2_CALL *
-        get_builder)(struct axiom_document *document,
-                     const axis2_env_t *env);                                           
             
-        /**
-         * @param om_document
-         * @return status code AXIS2_SUCCESS on success , otherwise AXIS2_FAILURE
-         */                                                  
-        axis2_status_t (AXIS2_CALL *
-        serialize)(struct axiom_document *document,
-                   const axis2_env_t *env,
-                   axiom_output_t *om_output);
-                                                           
     } axiom_document_ops_t;
 
   /**
@@ -132,8 +62,7 @@
     typedef struct axiom_document
     {
         /** ops of document struct */
-        axiom_document_ops_t *ops;
-      
+        const axiom_document_ops_t *ops;
     } axiom_document_t;
 
   /**
@@ -147,33 +76,101 @@
     axiom_document_create (const axis2_env_t *env,
                               axiom_node_t * root,
                               struct axiom_stax_builder *builder);
+  /** 
+    * Free document struct
+    * @param document pointer to axiom_document_t struct to be freed
+    * @param env Environment. MUST NOT be NULL    
+    * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_document_free (struct axiom_document *document,
+           const axis2_env_t *env);
+
+  /** Builds the next node if the builder is not finished with input xml stream
+    * @param document document whose next node is to be built. cannot be NULL
+    * @param env Environment. MUST NOT be NULL.        
+    * @return pointer to the next node. NULL on error.
+    */
+  
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
+    axiom_document_build_next (struct axiom_document *document,
+               const axis2_env_t *env);
+
+  /**
+    * Gets the root element of the document.
+    * @param document document to return the root of
+    * @param env Environment. MUST NOT be NULL.        
+    * @return returns a pointer to the root node. If no root present,
+    *            this method tries to build the root. Returns NULL on error. 
+    */
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
+    axiom_document_get_root_element(struct axiom_document *document,
+                      const axis2_env_t *env);
+
+  /**
+    * set the root element of the document. IF a root node is already exist,it is freed 
+    * before setting to root element 
+    * @param document document struct to return the root of
+    * @param env Environment. MUST NOT be NULL.        
+    * @return returns status code AXIS2_SUCCESS on success ,AXIS2_FAILURE on error. 
+    */        
+                                                    
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_document_set_root_element(struct axiom_document *document,
+                      const axis2_env_t *env,
+                      axiom_node_t *om_node);
+   /**
+    * This method builds the rest of the xml input stream from current position till
+    * the root element is completed .
+    *@param document pointer to axiom_document_t struct to be built.
+    *@param env environment MUST NOT be NULL.
+    */
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
+    axiom_document_build_all(struct axiom_document *document,
+               const axis2_env_t *env); 
+    /**
+     * get builder
+     * @return builder , returns NULL if a builder is not associated with 
+     *                   document
+     */
+    AXIS2_EXTERN struct axiom_stax_builder* AXIS2_CALL 
+    axiom_document_get_builder(struct axiom_document *document,
+                 const axis2_env_t *env);                                               
         
+    /**
+     * @param om_document
+     * @return status code AXIS2_SUCCESS on success , otherwise AXIS2_FAILURE
+     */                                                  
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_document_serialize(struct axiom_document *document,
+               const axis2_env_t *env,
+               axiom_output_t *om_output);
 
 /** frees given document */
 #define AXIOM_DOCUMENT_FREE(document,env) \
-        ((document)->ops->free(document,env))
+        axiom_document_free(document,env)
         
 /** builds next node of document */
 #define AXIOM_DOCUMENT_BUILD_NEXT(document,env) \
-        ((document)->ops->build_next(document,env))
+        axiom_document_build_next(document,env)
         
 /** gets the root eleemnt of given document */
 #define AXIOM_DOCUMENT_GET_ROOT_ELEMENT(document,env) \
-        ((document)->ops->get_root_element(document,env))
+        axiom_document_get_root_element(document,env)
 /** sets the root node */
 #define AXIOM_DOCUMENT_SET_ROOT_ELEMENT(document,env,om_node) \
-        ((document)->ops->set_root_element(document,env,om_node))
+        axiom_document_set_root_element(document,env,om_node)
                
 /** build till the root node is complete */
 #define AXIOM_DOCUMENT_BUILD_ALL(document,env) \
-        ((document)->ops->build_all(document,env))
+        axiom_document_build_all(document,env)
         
 /** returns the builder */
 #define AXIOM_DOCUMENT_GET_BUILDER(document, env) \
-        ((document)->ops->get_builder(document, env))
+        axiom_document_get_builder(document, env)
         
 /** serialize opertation */
 #define AXIOM_DOCUMENT_SERIALIZE(document, env, om_output) \
-        ((document)->ops->serialize(document, env, om_output))                
+        axiom_document_serialize(document, env, om_output)
 
 /** @} */
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message