Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

binderoo_util

Ethan Watson edited this page Jan 23, 2017 · 1 revision

binderoo_util

binderoo_util is a program that embeds a Binderoo host, and which can be used to load Binderoo Client libraries and perform various functions on it.

Launching binderoo_util

binderoo_util requires you to provide parameters at launch time. The format is as follows:

binderoo_util -f folder [-g class] [-gA] [-gAV versions] [-c] [-p param] [-p param]

-f folder

The -f parameter tells binderoo_util to search the specified folder for valid Binderoo Client libraries. This can be a relative or an absolute path.

binderoo_util will fail to launch if you do not provide a search folder. Using . as the search path is acceptable.

-g class

The -g parameter will print C++ code to bind functions required for the specified class for Binderoo Host usage to the console. Compile this output in to your project to automatically bind all required functions for that class.

Only one class is supported with the -g parameter. Multiple -g parameters will result in the last provided parameter taking precedence. If you require multiple classes to have bindings automatically generated, either run binderoo_util multiple times or use the -gA option.

-gA

The -gA parameter will print C++ code to bind functions for all classes for Binderoo Host usage to the console. Compile this output in to your project to automatically bind all required functions for all classes.

-gAV versions

The -gAV parameter is functionally equivalent to -gA, with the exception that C++ bindings will only be generated for the specified version strings.

-c function

The -c parameter will invoke the function with the exact fully qualified matching name inside a Binderoo Client library.

Functions with basic types as parameters can also have those values provided by the command line with the -p option.

The return value of the function is captured but currently not printed out by binderoo_host.

-p value

The -p parameter will pass value along as a parameter specified by the -c parameter.

Parameters are passed along in-order as specified on the command line. Basic D types that can be handled are:

  • C-style strings (const char*)
  • bool
  • char/uchar/byte
  • short/ushort
  • int/uint
  • long/ulong

Example usage

As a post-build step for a Binderoo Client library, to automatically create C++ bindings:

binderoo_util -f bin/release/clients -gA >src/BoundObjects.cpp

Clone this wiki locally