I am trying to create a wrapper for a rather large Fortran library. Many of the classes in this library have over a dozen fields and those fields are often their own classes. To avoid having to create a wrapper for all of these classes I want to use opaque pointers and factory functions to generate the classes automatically. However, in this library (and most Fortran codes I think) the objects are default constructed and then you call the factory with the first argument as the default constructed object. How can I get this empty handle in Julia so that I can actually call the factory function?
Basically I want to do:
empty_handle::Ptr{CVoid} = default_construct_my_fortran_type()
handle = from_file(empty_handle, filepath)