-
Notifications
You must be signed in to change notification settings - Fork 7
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.
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]
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.
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.
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.
The -gAV parameter is functionally equivalent to -gA, with the exception that C++ bindings will only be generated for the specified version strings.
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.
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
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