Package symboltable

Examples of symboltable.ExprForASTElement


       
        switch(t){
            case OneToOne:
            case ManyToOne:
               
                ExprForASTElement expr = p.getExprForValue();
                if(callWriteCsv4Entity && !p.isOptional()){
                    identMethodBody(rv);
                    rv = getMethodCall(rv, "this", "->", csvWriteMethoForEntities, expr.getCodeForElement());
                }
               
                if(!consProperty){
                    if(!p.isOptional()){
                        rv = identMethodBody(rv);
                        rv = getMethodCall(rv, aggrListName, ".", "push_back", callToString(expr));
                    }
                    else{
                        identMethodBody(rv).
                        append("if(").append(p.getCond()).append("){\n");
                       
                        //TODO: make a method for this group of calls
                        getMethodCall(identMethodBody(rv).append("  "), relationListName, ".", "push_back", callToString(expr));
                        getMethodCall(identMethodBody(rv).append("  "), writerName, "->", callToWriteLine, quote(lbPropertyName), "&"+relationListName);
                        getMethodCall(identMethodBody(rv).append("  "), relationListName, ".", "pop_back");
                        if(callWriteCsv4Entity){
                            getMethodCall(identMethodBody(rv).append("  "), "this", "->", csvWriteMethoForEntities, expr.getCodeForElement());
                        }
                        identMethodBody(rv).append("}\n");
                    }
                }
                break;
View Full Code Here


        while(it.hasNext()){

            Property pr = it.next();

            ExprForASTElement expr = pr.getExprForValue();
            conStr = conStr.append(identMethodBody(consListArgName)).
                            append(".push_back(").
                            append(callToString(expr)).
                            append(");\n");
        }

        conStr = getMethodFooter(conStr);
        conStr.append("\n");
        conStr = getMethodDeclHead(conStr, "string", "toString", consTargetType + " " + consThisName);
        identMethodBody(conStr).append("const string delim = ").append(writerName).append("->getDelim();\n");
        identMethodBody(conStr).append("ostringstream rv;\n");
        it = cons.getProperties();

        Property pr = it.next();
        assert pr.getExprForValue() != null;
        conStr = identMethodBody(conStr).append("rv << ").append(callToString(pr.getExprForValue()));


        while(it.hasNext()){
            assert pr.getExprForValue() != null;
            pr = it.next();
            ExprForASTElement expr = pr.getExprForValue();
            conStr = identMethodBody(conStr.append("\n")).append("      ");
            conStr = conStr.append(" << delim <<").append(callToString(expr));
        }

        conStr.append(";\n");
View Full Code Here

TOP

Related Classes of symboltable.ExprForASTElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.