lubyk logo

Lubyk documentation

LuaBinder

Use the dub.Inspector to create Lua bindings.

.new (options)

TODO MISSING DOCUMENTATION

:bind (inspector, options)

Add xml headers to the database. All options in parenthesis are optional.

output_directoryPath destination for generated C++ files.
(single_lib)Name of library when wrapping all classes into a single table. This creates a single library instead of one for each class. This name will be used as prefix for class metatables.
(namespace)Only parse elements in the given namespace. If this is set single_lib can be ommited and the namespace will be used as prefix.
(no_prefix)When this is set to true, do not add any prefix to class names.
(header_base)Part to remove in '#include' directives added to generated files. The default value is to remove the path to current directory.
(extra_headers)List of extra header includes to add in generated C++ files.
(custom_bindings)Path to a directory containing yaml files with custom bindings. Can also be a table. See Custom Bindings.

:build (options)

Simple build system (mostly used for testing). The opttions table contains the following entries:

(work_dir)Build working directory (default is current directory).
(inputs)List of C++ input files.
(includes)List of include paths.
(flags)List of extra compiler flags.
(compiler)List of compiler flags. Default is self.COMPILER.
(compiler_flags)List of compiler flags. Default is self.COMPILER_FLAGS[lub.plat()]
(verbose)Print build commands if true.

:bindClass (class, options)

The optional options table can contain:

(header_base)Part to remove in '#include' directives added to generated files. The default value is to remove the path to current directory.
(extra_headers)List of extra header includes to add in generated C++ files.
(custom_bindings)Path to a directory containing yaml files with custom bindings. Can also be a table. See Custom Bindings.

:addCustomTypes (list)

TODO MISSING DOCUMENTATION

:parseCustomBindings (custom)

TODO MISSING DOCUMENTATION

:functionBody (parent, method)

TODO MISSING DOCUMENTATION

:bindName (method)

TODO MISSING DOCUMENTATION

:headers (elem)

Return an iterator over the header of the element plus any extra header defined via 'extra_headers'.

:header (header)

Output the header for a class by removing the current path or 'header_base',

:customTypeAccessor (method)

TODO MISSING DOCUMENTATION

:name (elem)

Return the 'public' name to use for the element in the bindings. This can be used to rename classes or namespaces. Instead of rewriting this method, users can also use the 'name_filter' option.

:openName (elem)

Return the 'lua_open' name to use for the element in the bindings.

:constName (name, enum)

Return the 'public' name to use for a constant. Instead of rewriting this method, users can also use the 'const_name_filter' option.

:attrName (elem)

Return the 'public' name to use for an attribute. Instead of rewriting this method, users can also use the 'attr_name_filter' option.

:libName (elem)

TODO MISSING DOCUMENTATION

:luaType (parent, ctype)

TODO MISSING DOCUMENTATION

:toStringBody (class)

TODO MISSING DOCUMENTATION

:resolveTypes (base)

TODO MISSING DOCUMENTATION

:decisionTree (list)

See lua_simple_test for the output of this tree.

:openClasses (classes, indent)

TODO MISSING DOCUMENTATION

TODO

LuaBinderTODO MISSING DOCUMENTATION

#addCustomTypesTODO MISSING DOCUMENTATION

#parseCustomBindingsTODO MISSING DOCUMENTATION

#functionBodyTODO MISSING DOCUMENTATION

#bindNameTODO MISSING DOCUMENTATION

#customTypeAccessorTODO MISSING DOCUMENTATION

#libNameTODO MISSING DOCUMENTATION

#luaTypeTODO MISSING DOCUMENTATION

#toStringBodyTODO MISSING DOCUMENTATION

#resolveTypesTODO MISSING DOCUMENTATION

LuaBinderTODO move this into getParam ?

#openClassesTODO MISSING DOCUMENTATION