CxxWrap.CxxWrapCore.@initcxxMacro

@initcxx

Initialize the C++ pointer tables in a precompiled module using CxxWrap. Must be called from within __init__ in the wrapped module

CxxWrap.CxxWrapCore.@readmoduleMacro

@readmodule libraryfile_cb [functionname]

Read a C++ module and associate it with the Julia module enclosing the macro call. libraryfile_cb is a function that returns the shared library file to load as a string. In case of a JLL exporting libfoo.so it is possible to use foo_jll.get_libfoo_path()

CxxWrap.CxxWrapCore.@wrapfunctionsMacro

@wrapfunctions

Wrap the functions defined in the C++ side of the enclosing module. Requires that @readmodule and @wraptypes was called first.

CxxWrap.CxxWrapCore.@wrapmoduleMacro

@wrapmodule libraryfile_cb [functionname]

Place the functions and types from the C++ lib into the module enclosing this macro call Calls an entry point named define_julia_module, unless another name is specified as the second argument.

libraryfile_cb is a function that returns the shared library file to load as a string. In case of a JLL exporting libfoo.so it is possible to use foo_jll.get_libfoo_path()

CxxWrap.CxxWrapCore.@wraptypesMacro

@wraptypes

Wrap the types defined in the C++ side of the enclosing module. Requires that @readmodule was called first.

CxxWrap.StdLib.StdStringMethod
StdString(str, n::Integer)

Create a StdString from the first n code units of str (including null-characters).

Examples

julia> StdString("visible\0hidden", 10)
"visible\0hi"
CxxWrap.StdLib.StdStringMethod
StdString(str::String)

Create a StdString from the contents of the string. Any null-characters ('\0') will be included in the string such that ncodeunits(str) == ncodeunits(StdString(str)).

CxxWrap.StdLib.StdStringMethod
StdString(str::Union{Cstring, Base.CodeUnits, Vector{UInt8}, Ref{Int8}, Array{Int8}})

Create a StdString from the null-terminated character sequence.

If you want to construct a StdString that includes the null-character ('\0') either use StdString(::String) or StdString(::Any, ::Int).

Examples

julia> StdString(b"visible\0hidden")
"visible"