Did you know ... | Search Documentation: |
The class PlRegister |
This class encapsulates PL_register_foreign(). It is defined as a class rather then a function to exploit the C++ global constructor feature. This class provides a constructor to deal with the PREDICATE() way of defining foreign predicates as well as constructors to deal with more conventional foreign predicate definitions.
PL_FA_VARARGS
calling convention, where the argument
list of the predicate is passed using an array of term_t
objects as returned by PL_new_term_refs(). This interface poses
no limits on the arity of the predicate and is faster, especially for a
large number of arguments.static foreign_t pl_hello(PlTerm a1) { ... } PlRegister x_hello_1(NULL, "hello", 1, pl_hello);
This construct is currently supported upto 3 arguments.