#include "pabidecl.h"
#include "pstring.h"
#include "exprtype.h"
#include "pabstract.h"
#include "proparam.h"
Functions | |
TMPLPRO_API void APICALL | tmplpro_procore_init (void) |
generic load library/first use initializer. | |
TMPLPRO_API void APICALL | tmplpro_procore_done (void) |
generic load/first use library and unload/last use library hooks. | |
TMPLPRO_API const char *APICALL | tmplpro_version (void) |
version of the library | |
TMPLPRO_API struct tmplpro_param *APICALL | tmplpro_param_init (void) |
Constructor of tmplpro_param. | |
TMPLPRO_API void APICALL | tmplpro_param_free (struct tmplpro_param *) |
Destructor of tmplpro_param. | |
TMPLPRO_API int APICALL | tmplpro_exec_tmpl (struct tmplpro_param *) |
main method of libhtmltmplpro. | |
TMPLPRO_API PSTRING APICALL | tmplpro_tmpl2pstring (struct tmplpro_param *param, int *exitcode) |
main method of libhtmltmplpro. Returns processed template as a C string. | |
TMPLPRO_API int APICALL | tmplpro_get_int_option (struct tmplpro_param *param, const char *p, int *failure_ptr) |
string-based option getter, useful for dynamic languages. | |
TMPLPRO_API int APICALL | tmplpro_set_int_option (struct tmplpro_param *param, const char *p, int value) |
string-based option setter, useful for dynamic languages. | |
TMPLPRO_API void APICALL | tmplpro_reset_int_options (struct tmplpro_param *param) |
reset integer userspace options to their default values. | |
TMPLPRO_API int APICALL | tmplpro_errno (struct tmplpro_param *param) |
exit code of the last function call. | |
TMPLPRO_API const char *APICALL | tmplpro_errmsg (struct tmplpro_param *param) |
exit message of the last function call. | |
TMPLPRO_API void APICALL | tmplpro_set_expr_as_int64 (ABSTRACT_EXPRVAL *, EXPR_int64) |
method to return int64 value from callback of call_expr_userfnc_functype. | |
TMPLPRO_API void APICALL | tmplpro_set_expr_as_double (ABSTRACT_EXPRVAL *, double) |
method to return double value from callback of call_expr_userfnc_functype. | |
TMPLPRO_API void APICALL | tmplpro_set_expr_as_pstring (ABSTRACT_EXPRVAL *, PSTRING) |
method to return PSTRING value from callback of call_expr_userfnc_functype. | |
TMPLPRO_API void APICALL | tmplpro_set_expr_as_null (ABSTRACT_EXPRVAL *) |
method to return null from callback of call_expr_userfnc_functype. | |
TMPLPRO_API int APICALL | tmplpro_get_expr_type (ABSTRACT_EXPRVAL *) |
method for callback of push_expr_arglist_functype to determine the type of a value. | |
TMPLPRO_API EXPR_int64 APICALL | tmplpro_get_expr_as_int64 (ABSTRACT_EXPRVAL *) |
method for callback of push_expr_arglist_functype to retrieve a value as int64. | |
TMPLPRO_API double APICALL | tmplpro_get_expr_as_double (ABSTRACT_EXPRVAL *) |
method for callback of push_expr_arglist_functype to retrieve a value as double. | |
TMPLPRO_API PSTRING APICALL | tmplpro_get_expr_as_pstring (ABSTRACT_EXPRVAL *) |
method for callback of push_expr_arglist_functype to retrieve a value as PSTRING. |
An official libhtmltmplpro API header.
TMPLPRO_API const char* APICALL tmplpro_errmsg | ( | struct tmplpro_param * | param | ) |
exit message of the last function call.
A exit status message of the last function call. (For functions that return exit status).
TMPLPRO_API int APICALL tmplpro_errno | ( | struct tmplpro_param * | param | ) |
exit code of the last function call.
Exit code of the last function call. (For functions that return exit status).
TMPLPRO_API double APICALL tmplpro_get_expr_as_double | ( | struct exprval * | p | ) |
method for callback of push_expr_arglist_functype to retrieve a value as double.
It should only be used in a callback of push_expr_arglist_functype.
method for callback of push_expr_arglist_functype to retrieve a value as PSTRING.
It should only be used in a callback of push_expr_arglist_functype.
TMPLPRO_API int APICALL tmplpro_get_expr_type | ( | struct exprval * | p | ) |
method for callback of push_expr_arglist_functype to determine the type of a value.
It should only be used in a callback of push_expr_arglist_functype.
TMPLPRO_API int APICALL tmplpro_get_int_option | ( | struct tmplpro_param * | param, | |
const char * | p, | |||
int * | failure_ptr | |||
) |
string-based option getter, useful for dynamic languages.
non-NULL failure_ptr is used to return exit code. Note that exit code is also available via tmplpro_errno/tmplpro_errmsg. Non-null exit code indicates failure (invalid option).
TMPLPRO_API void APICALL tmplpro_procore_done | ( | void | ) |
generic load/first use library and unload/last use library hooks.
Deinitializer of global internal structures. Should be called before unloading the library.
TMPLPRO_API void APICALL tmplpro_procore_init | ( | void | ) |
generic load library/first use initializer.
Initializer of global internal structures. Should be called before first use of the library.
TMPLPRO_API void APICALL tmplpro_set_expr_as_double | ( | struct exprval * | p, | |
double | dval | |||
) |
method to return double value from callback of call_expr_userfnc_functype.
It should only be used in a callback of call_expr_userfnc_functype.
TMPLPRO_API void APICALL tmplpro_set_expr_as_int64 | ( | struct exprval * | p, | |
EXPR_int64 | ival | |||
) |
method to return int64 value from callback of call_expr_userfnc_functype.
It should only be used in a callback of call_expr_userfnc_functype.
TMPLPRO_API void APICALL tmplpro_set_expr_as_null | ( | struct exprval * | p | ) |
method to return null from callback of call_expr_userfnc_functype.
It should only be used in a callback of call_expr_userfnc_functype.
method to return PSTRING value from callback of call_expr_userfnc_functype.
It should only be used in a callback of call_expr_userfnc_functype.
TMPLPRO_API int APICALL tmplpro_set_int_option | ( | struct tmplpro_param * | param, | |
const char * | p, | |||
int | val | |||
) |
string-based option setter, useful for dynamic languages.
returns exit code, also available via tmplpro_errno/tmplpro_errmsg. Non-null exit code indicates failure (invalid option or invalid option value).
TMPLPRO_API PSTRING APICALL tmplpro_tmpl2pstring | ( | struct tmplpro_param * | param, | |
int * | retvalptr | |||
) |
main method of libhtmltmplpro. Returns processed template as a C string.
Note that returned PSTRING resides in an internal tmplpro buffer. A caller should copy its contents as it will be rewritten in the next call to tmplpro_tmpl2pstring. It is libhtmltmplpro ( tmplpro_param_free() ) responsibility to free the buffer's memory during the destruction of param object.
const char * tmplpro_version | ( | void | ) |
version of the library