Examples of MappedType


Examples of org.jruby.ext.ffi.MappedType

            return sbv.getStructClass().newInstance(runtime.getCurrentContext(),
                        new IRubyObject[] { new Pointer(runtime, memory) },
                        Block.NULL_BLOCK);

        } else if (type instanceof MappedType) {
            MappedType mappedType = (MappedType) type;
            return mappedType.fromNative(runtime.getCurrentContext(), fromNative(runtime, mappedType.getRealType(), buffer, index));

        } else {
            throw runtime.newTypeError("unsupported callback parameter type: " + type);
        }
View Full Code Here

Examples of org.jruby.ext.ffi.MappedType

        } else if (returnType instanceof StructByValue) {
            return new StructByValueInvoker((StructByValue) returnType);
       
        } else if (returnType instanceof MappedType) {
            MappedType ctype = (MappedType) returnType;
            return new ConvertingInvoker(getFunctionInvoker(ctype.getRealType()),
                    DataConverters.getResultConverter(ctype));
        }

        throw returnType.getRuntime().newArgumentError("Cannot get FunctionInvoker for " + returnType);
    }
View Full Code Here

Examples of org.jruby.ext.ffi.MappedType

        } else if (type instanceof org.jruby.ext.ffi.StructByValue) {
            return new StructByValueMarshaller((org.jruby.ext.ffi.StructByValue) type);
       
        } else if (type instanceof org.jruby.ext.ffi.MappedType) {
            MappedType ctype = (MappedType) type;
            return new ConvertingMarshaller(
                    getMarshaller(ctype.getRealType(), convention, enums),
                    DataConverters.getParameterConverter(type,
                        enums instanceof RubyHash ? (RubyHash) enums : null));

        } else {
            return null;
View Full Code Here

Examples of org.jruby.ext.ffi.MappedType

        } else if (returnType instanceof StructByValue) {
            return new StructByValueInvoker((StructByValue) returnType);
       
        } else if (returnType instanceof MappedType) {
            MappedType ctype = (MappedType) returnType;
            return new ConvertingInvoker(getFunctionInvoker(ctype.getRealType()),
                    DataConverters.getResultConverter(ctype));
        }

        throw returnType.getRuntime().newArgumentError("Cannot get FunctionInvoker for " + returnType);
    }
View Full Code Here

Examples of org.jruby.ext.ffi.MappedType

        } else if (type instanceof org.jruby.ext.ffi.StructByValue) {
            return new StructByValueMarshaller((org.jruby.ext.ffi.StructByValue) type);
       
        } else if (type instanceof org.jruby.ext.ffi.MappedType) {
            MappedType ctype = (MappedType) type;
            return new ConvertingMarshaller(
                    getMarshaller(ctype.getRealType(), convention, enums),
                    DataConverters.getParameterConverter(type,
                        enums instanceof RubyHash ? (RubyHash) enums : null));

        } else {
            return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.