graveyard/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java
/**
     * Converts a C++ datatype to a C-style datatype. 
     * References are converted to pointers.
     * STL strings are converted to char* C-style strings
     * String& is converted to char* (not char**)
     * AXIS, Axis and axis are converted to AXISC, Axisc and axisc
     */
Converts a C++ datatype to a C-style datatype.
References are converted to pointers.
STL strings are converted to char* C-style strings
String& is converted to char* (not char**)
AXIS, Axis and axis are converted to AXISC, Axisc and axisc
Converts a C ++ datatype to a C - style datatype . References are converted to pointers . STL strings are converted to char * C - style strings String& is converted to char * ( not char ** ) AXIS Axis and axis are converted to AXISC Axisc and axisc
private String toCType(Parameter p) throws Exception 
    {
        if (p.isVoid())
            return "void";
        String type = new String();
        Iterator it = p.iterator();
        String prev = new String();
        while (it.hasNext()) 
        {
            String tok = (String) it.next();
            if ("&".equals(tok)) 
            {
                if (!"string".equals(prev))
                    type += "*";
            } 
            else if ("string".equals(tok)) 
            {
                type += "char*";
                prev = tok;
            } 
            else if (headers.isClassName(tok)) 
                return "AXISCHANDLE";
            else if ("AnyType".equals(tok)) 
                type += "AxiscAnyType";
            else if ("bool".equals(tok)) 
                type += "AxiscBool";
            else if ("XML_String".equals(tok)) 
                type += "AXISC_XML_String";
            else if (tok.startsWith("xsd__")) 
                type += replaceInString(tok,"xsd__","xsdc__",null);
            else if (-1 != tok.toLowerCase().indexOf("axis")) 
                type += changeAxisToAxisc(tok);
            else if (!Utils.cTypeQualifiers.contains(tok) && 
                     !Utils.cPrimitives.contains(tok) && 
                     !tok.equals("tm") &&         
                     !tok.equals("...") &&         
                     !tok.equals("va_list") &&     
                     !tok.startsWith("xsd")) 
                type += "AXISC_"+tok;
            else 
                type += tok;
            if (it.hasNext())
                type += " ";
        }
        return type;
    }
private String toCType ( Parameter p ) throws Exception { if ( p . isVoid ( ) ) return "void" ; String type = new String ( ) ; Iterator it = p . iterator ( ) ; String prev = new String ( ) ; while ( it . hasNext ( ) ) { String tok = ( String ) it . next ( ) ; if ( "&" . equals ( tok ) ) { if ( ! "string" . equals ( prev ) ) type += "*" ; } else if ( "string" . equals ( tok ) ) { type += "char*" ; prev = tok ; } else if ( headers . isClassName ( tok ) ) return "AXISCHANDLE" ; else if ( "AnyType" . equals ( tok ) ) type += "AxiscAnyType" ; else if ( "bool" . equals ( tok ) ) type += "AxiscBool" ; else if ( "XML_String" . equals ( tok ) ) type += "AXISC_XML_String" ; else if ( tok . startsWith ( "xsd__" ) ) type += replaceInString ( tok , "xsd__" , "xsdc__" , null ) ; else if ( - 1 != tok . toLowerCase ( ) . indexOf ( "axis" ) ) type += changeAxisToAxisc ( tok ) ; else if ( ! Utils . cTypeQualifiers . contains ( tok ) && ! Utils . cPrimitives . contains ( tok ) && ! tok . equals ( "tm" ) && ! tok . equals ( "..." ) && ! tok . equals ( "va_list" ) && ! tok . startsWith ( "xsd" ) ) type += "AXISC_" + tok ; else type += tok ; if ( it . hasNext ( ) ) type += " " ; } return type ; }
Converts a C++ datatype to a C-style datatype.
Converts a C ++ datatype to a C - style datatype .
// Leave struct tm alone // Leave ... alone // Leave ... alone