@cfunction with CxxWrap arguments

Hi!
Is it possible to get pointer by @function if this function argument is CxxWrap binded struct?

Class binding

types.add_type<DataBase>("Database")
   .method("GetProperty", &DataBase::getProperty);

and julia function with binded class argument:

function Eg(db::CppTypes.Database, mat::Cint)
    return GetProperty(db, mat)
end

which will be getted on c++ side with:

auto *eg = (double (*)(DataBase *, int)) jl_unbox_voidpointer(jl_eval_string("@cfunction(Eg, Cdouble, (Ptr{Cvoid}, Cint))")); 

Seems like i dont understand julia interface enugh.
Should julia function get Ptr{Cvoid} as argument and convert it to desired structure via static_cast?

Thanks!

CxxWrtap doc stand that add_type create the foollowing structs:

abstract type World end

mutable struct WorldAllocated <: World
    cpp_object::Ptr{Cvoid}
end

and i try to create such object from void pointer

abstract type World end

mutable struct WorldAllocated <: World
    cpp_object::Ptr{Cvoid}
end

function Eg2(db::Ptr{Cvoid}, mat::Cint, T::Cdouble) :: Cdouble
    db2 = WorldAllocated(db) 

But it only work with manually defined class.

I cant create such object from one defined by CxxWrap.