autowrap.python.boilerplate

Necessary boilerplate for pyd.

To wrap all functions/return/parameter types and struct/class definitions from a list of modules, write this in a "main" module and generate mylib.{so,dll}:

mixin wrapAll(LibraryName("mylib"), Modules("module1", "module2", ...));

Members

Functions

pydInitMixin
string pydInitMixin(string libraryName)

A string to be mixed in that defines the PyInit function for a library.

pydMainMixin
string pydMainMixin(Modules modules, PreModuleInitCode preModuleInitCode, PostModuleInitCode postModuleInitCode)

A string to be mixed in that defines PydMain, automatically registering all functions and structs in the passed in modules.

wrapAll
string wrapAll(LibraryName libraryName, Modules modules, PreModuleInitCode preModuleInitCode, PostModuleInitCode postModuleInitCode)

A string to be mixed in that defines all the necessary runtime pyd boilerplate.

wrapDlang
string wrapDlang()

Returns a string to mixin that implements the necessary boilerplate to create a Python library containing one Python module wrapping all relevant D code and data structures.

Structs

LibraryName (from autowrap.types)
struct LibraryName via public import autowrap.types : Modules, LibraryName, PreModuleInitCode, PostModuleInitCode, RootNamespace;

The name of the dynamic library, i.e. the file name with the .so/.dll extension

Modules (from autowrap.types)
struct Modules via public import autowrap.types : Modules, LibraryName, PreModuleInitCode, PostModuleInitCode, RootNamespace;

The list of modules to automatically wrap for consumption by other languages.

PostModuleInitCode (from autowrap.types)
struct PostModuleInitCode via public import autowrap.types : Modules, LibraryName, PreModuleInitCode, PostModuleInitCode, RootNamespace;

Code to be inserted after the call to module_init

PreModuleInitCode (from autowrap.types)
struct PreModuleInitCode via public import autowrap.types : Modules, LibraryName, PreModuleInitCode, PostModuleInitCode, RootNamespace;

Code to be inserted before the call to module_init

RootNamespace (from autowrap.types)
struct RootNamespace via public import autowrap.types : Modules, LibraryName, PreModuleInitCode, PostModuleInitCode, RootNamespace;
Undocumented in source.

Meta