Package com4j.tlbimp.def

Examples of com4j.tlbimp.def.IInterfaceDecl


                    break;

                // we expect it to be an interface pointer.
                IPtrType pt = mb.returnType.queryInterface(IPtrType.class);
                IDispInterfaceDecl di = null;
                IInterfaceDecl ii = null;
                if (pt != null) {
                    IType t = pt.getPointedAtType();
                    di = t.queryInterface(IDispInterfaceDecl.class);
                    ii = t.queryInterface(IInterfaceDecl.class);
                }
View Full Code Here


        // look for the default interface first.
        for( int i=0; i<count; i++ ) {
            IImplementedInterfaceDecl impl = t.getImplementedInterface(i);
            if(impl.isSource())
                continue;
            IInterfaceDecl c = getCustom(impl);
            if(impl.isDefault() && c!=null)
                return c;
        }

        // if none is found, look for any non-source interface
        Set<IInterfaceDecl> types = new HashSet<IInterfaceDecl>();
        for( int i=0; i<count; i++ ) {
            IImplementedInterfaceDecl impl = t.getImplementedInterface(i);
            if(impl.isSource())
                continue;
            IInterfaceDecl c = getCustom(impl);
            if(c !=null)
                types.add(c);
        }

        if(types.isEmpty())
View Full Code Here

        return types.iterator().next();
    }

    private IInterfaceDecl getCustom(IImplementedInterfaceDecl impl) {
        ITypeDecl t = impl.getType();
        IInterfaceDecl ii = t.queryInterface(IInterfaceDecl.class);
        if(ii!=null)
            return ii;    // this is a custom interface

        IDispInterfaceDecl di = t.queryInterface(IDispInterfaceDecl.class);
        if(di.isDual())
View Full Code Here

                            // if the alias is defined against dispinterface,
                            // also define the same typedef for 'interface'

                            IDispInterfaceDecl dispi = def.queryInterface(IDispInterfaceDecl.class);
                            if(dispi.isDual()) {
                                IInterfaceDecl custitf = dispi.getVtblInterface();
                                aliases.put(custitf, typedef.getName());
                            }
                        }
                    }
                }
View Full Code Here

        private GUID getGUID(ITypeDecl decl) {
            IDispInterfaceDecl di = decl.queryInterface(IDispInterfaceDecl.class);
            if(di!=null)
                return di.getGUID();

            IInterfaceDecl ii = decl.queryInterface(IInterfaceDecl.class);
            if(ii!=null)
                return ii.getGUID();

            return null;
        }
View Full Code Here

        IPtrType ptrt = t.queryInterface(IPtrType.class);
        if(ptrt!=null) {
            // pointer type
            IType comp = ptrt.getPointedAtType();
            IInterfaceDecl compDecl = comp.queryInterface(IInterfaceDecl.class);
            if( compDecl!=null ) {
                // t = T* where T is a declared interface
                return new TypeBinding( g.getTypeName(compDecl), NativeType.ComObject, true );
            }

View Full Code Here

TOP

Related Classes of com4j.tlbimp.def.IInterfaceDecl

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.