You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ka...@apache.org on 2008/03/26 11:03:58 UTC

svn commit: r641233 - in /webservices/axis2/trunk/c/axiom: include/ src/parser/libxml2/

Author: kaushalye
Date: Wed Mar 26 03:03:56 2008
New Revision: 641233

URL: http://svn.apache.org/viewvc?rev=641233&view=rev
Log:
Axis2C hackathon: Fixing header comments

Modified:
    webservices/axis2/trunk/c/axiom/include/axiom_attribute.h
    webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.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_children_with_specific_attribute_iterator.h
    webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.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?rev=641233&r1=641232&r2=641233&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_attribute.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_attribute.h Wed Mar 26 03:03:56 2008
@@ -58,10 +58,13 @@
         axiom_namespace_t * ns);
 
     /**
-     * Free om attribute passed as void pointer. This will be
-     * cast into appropriate type and then pass the cast object
-     * into the om_attribute structure's free method
-     */
+      * Free om attribute passed as void pointer. This will be
+      * cast into appropriate type and then pass the cast object
+      * into the om_attribute structure's free method
+      * @param  om_attribute pointer to attribute struct to be freed
+      * @param  env Environment. MUST NOT be NULL
+      */
+   
     AXIS2_EXTERN void AXIS2_CALL
     axiom_attribute_free_void_arg(
         void *om_attribute,
@@ -71,8 +74,6 @@
       * 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 void AXIS2_CALL
@@ -107,11 +108,11 @@
         const axutil_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.
-     */
+    /** 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,
@@ -189,11 +190,21 @@
                     struct axiom_attribute *om_attribute,
                     const axutil_env_t * env);
 
+    /** Increment the reference counter.
+     * @param om_attribute a pointer to om_attribute struct  
+     * @param env environment, MUST NOT be NULL.
+     * @return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+     */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axiom_attribute_increment_ref(
         struct axiom_attribute *om_attribute,
         const axutil_env_t * env);
 
+    /** Create OM attribute 
+     * @param om_attribute a pointer to om_attribute struct  
+     * @param env environment, MUST NOT be NULL.
+     * @return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+     */
     AXIS2_EXTERN axiom_attribute_t *AXIS2_CALL
     axiom_attribute_create_str(
         const axutil_env_t * env,
@@ -201,23 +212,42 @@
         axutil_string_t * value,
         axiom_namespace_t * ns);
 
+    /**  Get the localname as a string
+     * @param om_attribute a pointer to om_attribute struct  
+     * @param env environment, MUST NOT be NULL.
+     * @return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+     */
     AXIS2_EXTERN axutil_string_t *AXIS2_CALL
-
     axiom_attribute_get_localname_str(
         axiom_attribute_t * attribute,
         const axutil_env_t * env);
 
+    /**  Get the value as a string
+     * @param om_attribute a pointer to om_attribute struct  
+     * @param env environment, MUST NOT be NULL.
+     * @return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+     */
     AXIS2_EXTERN axutil_string_t *AXIS2_CALL
     axiom_attribute_get_value_str(
         axiom_attribute_t * attribute,
         const axutil_env_t * env);
 
+    /**  Set the localname of the attribute
+     * @param om_attribute a pointer to om_attribute struct  
+     * @param env environment, MUST NOT be NULL.
+     * @return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+     */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axiom_attribute_set_localname_str(
         axiom_attribute_t * attribute,
         const axutil_env_t * env,
         axutil_string_t * localname);
 
+    /**  Set the value of the attribute
+     * @param om_attribute a pointer to om_attribute struct  
+     * @param env environment, MUST NOT be NULL.
+     * @return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+     */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axiom_attribute_set_value_str(
         axiom_attribute_t * attribute,

Modified: webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h?rev=641233&r1=641232&r2=641233&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h Wed Mar 26 03:03:56 2008
@@ -40,7 +40,13 @@
      * @ingroup axiom_om
      * @{
      */
-
+    
+    /**
+     * Free the iterator
+     * @param iterator a pointer to child element iterator struct
+     * @param env environment, MUST NOT be NULL.
+     */
+    
     AXIS2_EXTERN void AXIS2_CALL
     axiom_child_element_iterator_free(
         void *iterator,
@@ -52,9 +58,11 @@
     * 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.
+    *  @param iterator a pointer to child element iterator struct
+     * @param env environment, MUST NOT be NULL.
     */
+    
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
     axiom_child_element_iterator_remove(
         axiom_child_element_iterator_t * iterator,
         const axutil_env_t * env);
@@ -63,6 +71,8 @@
      * returns true if the iteration has more elements 
      * in otherwords it returns true if the next() would return an element
      * rather than null with an error code set to environments error
+     * @param iterator a pointer to child element iterator struct
+     * @param env environment, MUST NOT be NULL.
      */
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 
@@ -72,7 +82,9 @@
 
     /**
      * Returns the next element in the iteration. Returns null if there 
-    * is no more elements 
+     * is no more elements 
+     * @param iterator a pointer to child element iterator struct
+     * @param env environment, MUST NOT be NULL.
      */
     AXIS2_EXTERN axiom_node_t *AXIS2_CALL
     axiom_child_element_iterator_next(
@@ -80,13 +92,13 @@
         const axutil_env_t * env);
 
     /**
+     * Create a child element interator for the current child
      * @param current child
-     * @param env environment
+     * @param env environment, MUST NOT be NULL.
      * return axiom_child_element_iterator_t
      */
 
     AXIS2_EXTERN axiom_child_element_iterator_t *AXIS2_CALL
-
     axiom_child_element_iterator_create(
         const axutil_env_t * env,
         axiom_node_t * current_child);

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?rev=641233&r1=641232&r2=641233&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_children_iterator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_children_iterator.h Wed Mar 26 03:03:56 2008
@@ -54,6 +54,8 @@
 
     /**
     * Free the om_children_iterator struct
+    * @param iterator a pointer to axiom children iterator struct
+    * @param env environment, MUST NOT be NULL
     */
     AXIS2_EXTERN void AXIS2_CALL
     axiom_children_iterator_free(
@@ -66,6 +68,8 @@
     * 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.
+    * @param iterator a pointer to axiom children iterator struct
+    * @param env environment, MUST NOT be NULL
     */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axiom_children_iterator_remove(
@@ -76,6 +80,8 @@
      * @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
+     * @param iterator a pointer to axiom children iterator struct
+     * @param env environment, MUST NOT be NULL
      */
 
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
@@ -85,7 +91,9 @@
 
     /**
      * Returns the next element in the iteration. Returns null if there are
-    * no more elements in the iteration
+     * no more elements in the iteration
+     * @param iterator a pointer to axiom children iterator struct
+     * @param env environment, MUST NOT be NULL
      */
     AXIS2_EXTERN axiom_node_t *AXIS2_CALL
     axiom_children_iterator_next(
@@ -95,7 +103,8 @@
     /**
      * Resets the Iterator. This moves the cursor back to the initial.
      * iterator chidren_iterator to be reset.
-     * @param env Environment. MUST NOT be NULL.
+     * @param iterator a pointer to axiom children iterator struct
+     * @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

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?rev=641233&r1=641232&r2=641233&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_children_qname_iterator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_children_qname_iterator.h Wed Mar 26 03:03:56 2008
@@ -43,7 +43,6 @@
      */
 
     AXIS2_EXTERN axiom_children_qname_iterator_t *AXIS2_CALL
-
     axiom_children_qname_iterator_create(
         const axutil_env_t * env,
         axiom_node_t * current_child,
@@ -51,6 +50,8 @@
 
     /**
      * free om_children_qname_iterator struct 
+     * @param iterator a pointer to axiom children iterator struct
+     * @param env environment, MUST NOT be NULL
      */
     AXIS2_EXTERN void AXIS2_CALL
     axiom_children_qname_iterator_free(
@@ -63,6 +64,8 @@
      * 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.
+     * @param iterator a pointer to axiom children iterator struct
+     * @param env environment, MUST NOT be NULL
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
 
@@ -74,6 +77,8 @@
      * 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
+     * @param iterator a pointer to axiom children iterator struct
+     * @param env environment, MUST NOT be NULL
      */
 
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
@@ -84,6 +89,8 @@
 
     /**
      * Returns the next element in the iteration.
+     * @param iterator a pointer to axiom children iterator struct
+     * @param env environment, MUST NOT be NULL
      */
     AXIS2_EXTERN axiom_node_t *AXIS2_CALL
     axiom_children_qname_iterator_next(

Modified: webservices/axis2/trunk/c/axiom/include/axiom_children_with_specific_attribute_iterator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_children_with_specific_attribute_iterator.h?rev=641233&r1=641232&r2=641233&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_children_with_specific_attribute_iterator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_children_with_specific_attribute_iterator.h Wed Mar 26 03:03:56 2008
@@ -43,23 +43,25 @@
      */
 
     /**
-    * Free function free the om_children_with_specific_attribute_iterator struct
-    */
+     * Free function free the om_children_with_specific_attribute_iterator struct
+     * @param iterator a pointer to axiom children with specific attribute iterator struct
+     * @param env environment, MUST NOT be NULL
+     */
     AXIS2_EXTERN void AXIS2_CALL
-
     axiom_children_with_specific_attribute_iterator_free(
         axiom_children_with_specific_attribute_iterator_t * iterator,
         const axutil_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.
-    */
+     * 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.
+     * @param iterator a pointer to axiom children with specific attribute iterator struct
+     * @param env environment, MUST NOT be NULL
+     */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
     axiom_children_with_specific_attribute_iterator_remove(
         axiom_children_with_specific_attribute_iterator_t * iterator,
         const axutil_env_t * env);
@@ -68,32 +70,36 @@
      * Returns true< if the iteration has more elements. (In other
      * words, returns true if next would return an axiom_node_t struct
      * rather than NULL with error code set in environment
+     * @param iterator a pointer to axiom children with specific attribute iterator struct
+     * @param env environment, MUST NOT be NULL
      */
 
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-
     axiom_children_with_specific_attribute_iterator_has_next(
         axiom_children_with_specific_attribute_iterator_t * iterator,
         const axutil_env_t * env);
 
     /**
      * Returns the next element in the iteration. returns null if there is no 
-    * more elements in the iteration
+     * more elements in the iteration
+     * @param iterator a pointer to axiom children with specific attribute iterator struct
+     * @param env environment, MUST NOT be NULL
      */
     AXIS2_EXTERN axiom_node_t *AXIS2_CALL
-
     axiom_children_with_specific_attribute_iterator_next(
         axiom_children_with_specific_attribute_iterator_t * iterator,
         const axutil_env_t * env);
 
     /**
-     * @param current child
-     * @param env environment
+     * @param env environment, MUST NOT be NULL
+     * @param current_child the current child for the interation
+     * @param attr_qname the qname for the attribute
+     * @param attr_value the value string for the attribute
+     * @param detach AXIS2_TRUE to detach AXIS2_FALSE not to
      * return axiom_children_with_specific_attribute_iterator_t
      */
 
-    AXIS2_EXTERN axiom_children_with_specific_attribute_iterator_t
-    *AXIS2_CALL
+    AXIS2_EXTERN axiom_children_with_specific_attribute_iterator_t *AXIS2_CALL
     axiom_children_with_specific_attribute_iterator_create(
         const axutil_env_t * env,
         axiom_node_t * current_child,

Modified: webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c?rev=641233&r1=641232&r2=641233&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c Wed Mar 26 03:03:56 2008
@@ -275,6 +275,8 @@
     if (!wrapper_impl)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                          "No memory. Cannot create libxml2 reader wrapper");
         return NULL;
     }
 
@@ -283,7 +285,7 @@
     if (!(wrapper_impl->reader))
     {
         AXIS2_FREE(env->allocator, wrapper_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_CREATING_XML_STREAM_READER,
                         AXIS2_FAILURE);
         return NULL;
     }
@@ -325,6 +327,8 @@
     if (!wrapper_impl)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                          "No memory. Cannot create libxml2 reader wrapper");
         return NULL;
     }
     wrapper_impl->close_input_callback = NULL;
@@ -349,7 +353,7 @@
     if (!(wrapper_impl->reader))
     {
         AXIS2_FREE(env->allocator, wrapper_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_CREATING_XML_STREAM_READER,
                         AXIS2_FAILURE);
         return NULL;
     }
@@ -387,6 +391,8 @@
     if (!wrapper_impl)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                          "No memory. Cannot create libxml2 reader wrapper");
         return NULL;
     }
     wrapper_impl->close_input_callback = NULL;
@@ -406,7 +412,7 @@
     else
     {
         AXIS2_FREE(env->allocator, wrapper_impl);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_XML_PARSER_INVALID_MEM_TYPE,
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_XML_PARSER_INVALID_MEM_TYPE,
                         AXIS2_FAILURE);
         return NULL;
     }
@@ -414,7 +420,7 @@
     if (!(wrapper_impl->reader))
     {
         AXIS2_FREE(env->allocator, wrapper_impl);
-        AXIS2_ERROR_SET(env->error,
+        AXIS2_HANDLE_ERROR(env,
                         AXIS2_ERROR_CREATING_XML_STREAM_READER, AXIS2_FAILURE);
         return NULL;
     }



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