axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: ws-axis/c/tools/trace/org/apache/axis/tracetool Tracer.java
Date Fri, 12 Nov 2004 11:08:09 GMT
whitlock    2004/11/12 03:08:09

  Modified:    c/include/axis/server AxisUserAPI.hpp
               c/src/common AxisTrace.cpp AxisTrace.h
               c/tools/trace/org/apache/axis/tracetool Tracer.java
  Log:
  Change Axis_Array and other array representations from a struct to a class
  Trace AxisChar*, stl strings and others correctly
  
  Revision  Changes    Path
  1.9       +29 -24    ws-axis/c/include/axis/server/AxisUserAPI.hpp
  
  Index: AxisUserAPI.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/AxisUserAPI.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AxisUserAPI.hpp	11 Nov 2004 16:19:49 -0000	1.8
  +++ AxisUserAPI.hpp	12 Nov 2004 11:08:09 -0000	1.9
  @@ -30,7 +30,6 @@
     * to the C language types.
     * @author Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
     */
  -#define AxisChar char
   
   /**
    * @typedef xsd__string
  @@ -182,32 +181,38 @@
   } AXIS_BINDING_STYLE;
   
   #define AXIS_DEFINED_ARRAY(type) \
  -    struct {\
  +    class type##_Array {\
  +      public:\
           type * m_Array;\
           int m_Size;\
  -    }
  +    };
   
  -typedef AXIS_DEFINED_ARRAY(void) Axis_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__string) xsd__string_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__integer) xsd__integer_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__int) xsd__int_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__long) xsd__long_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__short) xsd__short_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__decimal) xsd__decimal_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__float) xsd__float_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__double) xsd__double_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__boolean) xsd__boolean_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__QName) xsd__QName_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__NCName) xsd__NCName_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__dateTime) xsd__dateTime_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__unsignedByte) xsd__unsignedByte_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__unsignedInt) xsd__unsignedInt_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__unsignedLong) xsd__unsignedLong_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__unsignedShort) xsd__unsignedShort_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__base64Binary) xsd__base64Binary_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__hexBinary) xsd__hexBinary_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__anyURI) xsd__anyURI_Array;
  -typedef AXIS_DEFINED_ARRAY(xsd__NMTOKEN) xsd__NMTOKEN_Array;
  +class Axis_Array {
  +  public:
  +    void* m_Array;
  +    int m_Size;
  +};
  +
  +AXIS_DEFINED_ARRAY(xsd__string)
  +AXIS_DEFINED_ARRAY(xsd__integer)
  +AXIS_DEFINED_ARRAY(xsd__int)
  +AXIS_DEFINED_ARRAY(xsd__long)
  +AXIS_DEFINED_ARRAY(xsd__short)
  +AXIS_DEFINED_ARRAY(xsd__decimal)
  +AXIS_DEFINED_ARRAY(xsd__float)
  +AXIS_DEFINED_ARRAY(xsd__double)
  +AXIS_DEFINED_ARRAY(xsd__boolean)
  +AXIS_DEFINED_ARRAY(xsd__QName)
  +AXIS_DEFINED_ARRAY(xsd__NCName)
  +AXIS_DEFINED_ARRAY(xsd__dateTime)
  +AXIS_DEFINED_ARRAY(xsd__unsignedByte)
  +AXIS_DEFINED_ARRAY(xsd__unsignedInt)
  +AXIS_DEFINED_ARRAY(xsd__unsignedLong)
  +AXIS_DEFINED_ARRAY(xsd__unsignedShort)
  +AXIS_DEFINED_ARRAY(xsd__base64Binary)
  +AXIS_DEFINED_ARRAY(xsd__hexBinary)
  +AXIS_DEFINED_ARRAY(xsd__anyURI)
  +AXIS_DEFINED_ARRAY(xsd__NMTOKEN)
    
   #define AXIS_OUT_PARAM 
   
  
  
  
  1.41      +10 -0     ws-axis/c/src/common/AxisTrace.cpp
  
  Index: AxisTrace.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.cpp,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- AxisTrace.cpp	11 Nov 2004 10:51:35 -0000	1.40
  +++ AxisTrace.cpp	12 Nov 2004 11:08:09 -0000	1.41
  @@ -451,6 +451,16 @@
   		}
   		break;
   
  +	case TRACETYPE_STLSTRING:
  +		try {
  +			line += "\"";	
  +   		      line += ((string*)value)->c_str();
  +			line += "\"";	
  +		} catch (...) {
  +			line += "<BADPOINTER>";
  +		}
  +		break;
  +
   	default:
   		sprintf(prim,"%d",type);
   		line += "<UNKNOWNTYPE";				
  
  
  
  1.15      +2 -1      ws-axis/c/src/common/AxisTrace.h
  
  Index: AxisTrace.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AxisTrace.h	11 Nov 2004 10:51:35 -0000	1.14
  +++ AxisTrace.h	12 Nov 2004 11:08:09 -0000	1.15
  @@ -74,7 +74,8 @@
   	TRACETYPE_BOOL,
   	TRACETYPE_POINTER,
   	TRACETYPE_DATA,
  -	TRACETYPE_STRING
  +	TRACETYPE_STRING,
  +	TRACETYPE_STLSTRING
   } AxisTraceType;
   
   class AxisTrace
  
  
  
  1.8       +11 -5     ws-axis/c/tools/trace/org/apache/axis/tracetool/Tracer.java
  
  Index: Tracer.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tools/trace/org/apache/axis/tracetool/Tracer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Tracer.java	11 Nov 2004 10:51:35 -0000	1.7
  +++ Tracer.java	12 Nov 2004 11:08:09 -0000	1.8
  @@ -14,10 +14,8 @@
    *   limitations under the License.
    */
   package org.apache.axis.tracetool;
  -import java.io.BufferedWriter;
  -import java.io.IOException;
  -import java.io.Writer;
  -import java.util.Hashtable;
  +import java.io.*;
  +import java.util.*;
   
   /**
    * A Buffered write that also contains the methods to add in in trace
  @@ -46,8 +44,16 @@
   		typetable.put("double", "DOUBLE");
   		typetable.put("float", "FLOAT");
   		typetable.put("bool", "BOOL");
  +		typetable.put("string", "STLSTRING");
  +		typetable.put("AxisString", "STLSTRING");
  +		typetable.put("AxisXMLString", "STLSTRING");
  +		typetable.put("xsd__string", "STLSTRING");
   	}
   
  +	private final static Set charSet =
  +		new HashSet(Arrays.asList(new Object[] {
  +		"char", "AxisChar", "AxisXMLChar", "XML_Ch" }));
  +
   	/**
   	 * @param writer a writer to the output file.
   	 */
  @@ -232,7 +238,7 @@
   			parms += "UNKNOWN, 0, NULL";
   		else if (type.endsWith("*")) {
   			String contents = type.substring(0, type.length() - 1);
  -			if ("char".equals(contents))
  +			if (charSet.contains(contents))
   				parms += "STRING, 0, " + name;
   			else if ("void".equals(contents))
   				// We just don't know what this void* is pointing at 
  
  
  

Mime
View raw message