Package org.apache.yoko.tools.common.idltypes

Examples of org.apache.yoko.tools.common.idltypes.IdlStruct


   
    private IdlType createStruct(CorbaTypeImpl ctype, IdlScopeBase scope,
                                 String local) throws Exception {
        Struct s = (Struct)ctype;
        boolean undefinedCircular = false;
        IdlStruct struct = IdlStruct.create(scope, local);
        scope.holdForScope(struct);

        Iterator it = s.getMember().iterator();
        while (it.hasNext()) {
            MemberType m = (MemberType)it.next();
            QName qname = m.getIdltype();
            IdlType type = findType(qname);           
           
            // Ensure that this struct will not be written until
            // all of its circular members are defined, unless
            // the undefined circular members are of sequence type.

            if (!undefinedCircular && !(type instanceof IdlSequence)) {
                String mlocal = qname.getLocalPart();
                String mname[] = unscopeName(mlocal);
                undefinedCircular = null != root.lookup(mname, true);
            }

            struct.addToScope(IdlField.create(struct, m.getName(), type));
        }

        if (undefinedCircular) {
            scope.parkHeld();
        } else {
            scope.promoteHeldToScope();
            if (struct.isCircular()) {
                // resolving this struct closed a recursion
                scope.flush();
            }
        }
       
View Full Code Here


    }
   
    private IdlType createStruct(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
        Struct s = (Struct)ctype;
        boolean undefinedCircular = false;
        IdlStruct struct = IdlStruct.create(scope, local);
        scope.holdForScope(struct);

        Iterator it = s.getMember().iterator();
        while (it.hasNext()) {
            MemberType m = (MemberType)it.next();
            QName qname = m.getIdltype();
            IdlType type = findType(qname);           
           
            // Ensure that this struct will not be written until
            // all of its circular members are defined, unless
            // the undefined circular members are of sequence type.

            if (!undefinedCircular && !(type instanceof IdlSequence)) {
                String mlocal = qname.getLocalPart();
                String mname[] = unscopeName(mlocal);
                undefinedCircular = null != root.lookup(mname, true);
            }

            struct.addToScope(IdlField.create(struct, m.getName(), type));
        }

        if (undefinedCircular) {
            scope.parkHeld();
        } else {
            scope.promoteHeldToScope();
            if (struct.isCircular()) {
                // resolving this struct closed a recursion
                scope.flush();
            }
        }
       
View Full Code Here

TOP

Related Classes of org.apache.yoko.tools.common.idltypes.IdlStruct

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.