The various PL_*() functions in SWI-Prolog.h have
corresponding Plx_*() functions. There are three kinds of wrappers:
false,
indicating an error. The Plx*() function checks for this and throws a PlException
object containing the error. The wrapper uses template<typename
C_t> C_t PlExce(C_t rc), where C_t is the return
type of the PL_*() function. (These are defined using the PLX_WRAP()
macro.)
true if it succeeds and false if it fails or
has a runtime error. If it fails, the wrapper checks for a Prolog error
and throws a PlException object containing the error. The
wrapper uses template<typename C_t> C_t PlWrap(C_t rc),
where C_t is the return type of the PL_*() function. (These
are defined using the PLX_EXCE() macro.)
A few PL_*() functions do not have a corresponding Plx*() function
because they do not fit into one of these categories. For example,
PL_next_solution() has multiple return values (PL_S_EXCEPTION,
PL_S_LAST, etc.) if the query was opened with the
PL_Q_EXT_STATUS flag.
Most of the PL_*() functions whose first argument is of type
term_t, atom_t, etc. have corresponding
methods in classes PlTerm, PlAtom, etc.