private String toCType()

in graveyard/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java [464:511]


    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") &&         // Leave struct tm alone
                     !tok.equals("...") &&         // Leave ... alone
                     !tok.equals("va_list") &&     // Leave ... alone
                     !tok.startsWith("xsd")) 
                type += "AXISC_"+tok;
            else 
                type += tok;
            
            if (it.hasNext())
                type += " ";
        }
        return type;
    }