JuliaObjDynamicLinker

jutils.spad line 584 [edit on github]

Generic Julia objects used for dynamically linking shared libraries.

=: (%, %) -> Boolean

from BasicType

~=: (%, %) -> Boolean

from BasicType

coerce: % -> OutputForm

from CoercibleTo OutputForm

convert: % -> String

from ConvertibleTo String

jdlink: String -> %

jdlink(lib) opens/loads the dynamic shared library lib and returns a reference pointer that can be used to obtain adress to symbols in it using jlDlSym. It is up to the user to unload the shared object when it is no longer necessary using jlDlClose. example{jdlink “libopenlibm”} Throws a Julia error if it is not found. Use jlDlOpen for a version with options and/or without Julia errors.

jlAbout: % -> Void

from JuliaObjectType

jlApply: (String, %) -> %

from JuliaObjectType

jlApply: (String, %, %) -> %

from JuliaObjectType

jlApply: (String, %, %, %) -> %

from JuliaObjectType

jlApply: (String, %, %, %, %) -> %

from JuliaObjectType

jlApply: (String, %, %, %, %, %) -> %

from JuliaObjectType

jlApply: (String, %, %, %, %, %, %) -> %

from JuliaObjectType

jlDlCApply: (%, JuliaObject) -> JuliaObject

jlDlCApply(func,x) applies the function pointer func to x. The Julia type of x must be compatible with the Libdl Julia module. Type of the returned value is assumed to be the same than the type of x. For example: example{libm:= jlDlOpen “libopenlibm”} example{squareRoot:=jlDlSym(libm,jsym(sqrt))} example{jlDlCApply(squareRoot,jobject(“2.”))}

jlDlCApply: (%, JuliaObject, JuliaObject) -> JuliaObject

jlDlCApply(func,x,y) applies the function pointer func to x and y. Type of the returned value is assumed to be the same than the type of x. For example: example{libgsl:= jlDlOpen “libgsl”} example{ipower:=jlDlSym(libgsl, gsl_pow_int)} example{jlDlCApply(ipower,jobject(“2.0”),jobject(“7”))}

jlDlCApply: (%, JuliaObject, JuliaObject, JuliaObject) -> JuliaObject

jlDlCApply(func,x,y,z) applies the function pointer func to x, y and z. Returned value is assumed the same type than type of x. Use jlDlCApply with type options if necessary. For example with GSL: example{gsl:= jlDlOpen “libgsl”} example{hypot3:= jlDlSym(gsl,jsym(gsl_hypot3))} example{jlDlCApply(hypot3,jobject(“2.”),jobject(“7.”),jobjet(“9.0”))}

jlDlCApply: (%, String, JuliaObject, String) -> JuliaObject

jlDlCApply(func, ctype, x, xctype) applies the function pointer func to x given its Julia C type (xctype) or its supported Julia type, for example “Float64” or “Cdouble”. Returned value is assumed to be a C type ctype (or any Julia supported types). For example: example{libm:= jlDlOpen “libopenlibm”} example{squareRoot:= jlDlSym(libm,jsym(sqrt))} example{jlDlCApply(squareRoot, “Cdouble” jobject(“2.”), “Cdouble”)} example{sinus:=jlDlSym(libm,jsym(sin))} example{jlDlCApply(sinus,”Float64”), jobject(“2.”), “Float64”)}

jlDlCApply: (%, String, JuliaObject, String, JuliaObject, String) -> JuliaObject

jlDlCApply(func, ctype, x, xctype, y, xctype) applies the function pointer func to x and y given their Julia C type (xctype and xctype) or their supported Julia type, for example “Float64” or “Cdouble”. Returned value is assumed to be a C type ctype (or any Julia supported types).

jlDlCApply: (%, String, JuliaObject, String, JuliaObject, String, JuliaObject, String) -> JuliaObject

jlDlCApply(func, ctype, x, xctype, y, xctype, z, ztype) applies the function pointer func to x given its Julia C type (xctype) or its supported Julia type, for example “Float64” or “Cdouble”. Returned value is assumed to be a C type ctype (or any Julia supported types).

jlDlClose: % -> Boolean

jlDlClose(libPtr) unload explicitely the shared library referenced by libPtr.

jlDlFindLib: String -> String

jlDlFindLib(lib) returns the the library lib. Returns an empty string if it is not found.

jlDlList: () -> JuliaObject

jlDlList() returns the list of loaded shared objects by the currect processus in a JuliaObject referencing a Julia vector of strings.

jlDlOpen: (String, Boolean) -> %

jlDlOpen(lib, throw) opens/loads the dynamic shared library lib and returns a reference pointer that can be used to obtain adress to symbols in it using jlDlSym. It is up to the user to unload the shared object when it is no longer used. ‘throw’ determines whether or not Julia throws an error if the library can not be loaded. example{jlDlOpen(“libopenlibm”, true)}

jlDlOpen: (String, JuliaObject) -> %

jlDlOpen(lib, flags) opens/loads the dynamic shared library lib and returns a reference pointer that can be used to obtain adress to symbols in it using jlDlSym. It is up to the user to unload the shared object when it is no longer used. Does not throw an error if the library can not be loaded by default and returns nothing in this case. Use the nothing? operation on the returned value if necessary. example{jlUsing “Libdl” – for flags} example{jlDlOpen(“libopenlibm”, jobject “Libdl.RTLD_NOW”)} flags can be one or combinaison of: RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW Note: the Libdl must be loaded or imported before using these flags.

jlDlOpen: (String, JuliaObject, Boolean) -> %

jlDlOpen(lib, flags, throw) opens/loads the dynamic shared library lib and returns a reference pointer that can be used to obtain adress to symbols in it using jlDlSym. It is up to the user to unload the shared object when it is no longer used. Does not throw an error if the library can not be loaded by default and returns nothing in this case. Use the nothing? operation on the returned value if necessary. ‘throw’ determines whether or not Julia throws an error if the library can not be loaded. example{jlDlOpen(“libopenlibm”, jobject “Libdl.RTLD_NOW”, false)} flags can be one or combinaison of: RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW Note: the Libdl must be loaded or imported before using these flags.

jlDlOpen: String -> %

jlDlOpen(lib) opens/loads the dynamic shared library lib and returns a reference pointer that can be used to obtain adress to symbols in it using jlDlSym. It is up to the user to unload the shared object when it is no longer used. Does not throw an error if the library can not be loaded and returns ‘nothing’ in this case. Use the nothing? operation on the returned value if necessary.

jlDlPath: % -> String

jlDlPath(lib) returns the path of the loaded library lib.

jlDlPath: String -> String

jlDlPath(lib) returns the path of the library lib. Julia warns if it is not found and returns an empty string.

jlDlSym: (%, JuliaSymbol) -> %

jlDlSym(lib, sym) returns the pointer to the symbol sym in the library referenced by lib. See jlDlOpen. example{lnk:=jdlink “libjulia”} example{sym := jlDlSym(lnk,”jl_eval_string”)} example{TODO}

jlId: % -> String

from JuliaObjectType

jlRef: % -> SExpression

from JuliaObjectType

jlref: String -> %

from JuliaObjectType

jlType: % -> String

from JuliaObjectType

latex: % -> String

from SetCategory

mutable?: % -> Boolean

from JuliaObjectType

nothing?: % -> Boolean

from JuliaObjectType

string: % -> String

from JuliaObjectType

BasicType

CoercibleTo OutputForm

ConvertibleTo String

JuliaObjectType

JuliaType

SetCategory