Method
TemplateTemplateexpand
Declaration
gboolean
tmpl_template_expand (
TmplTemplate* self,
GOutputStream* stream,
TmplScope* scope,
GCancellable* cancellable,
GError** error
)
Description
Expands a template into stream using the scope provided.
scope should have all of the variables set that are required to expand
the template, or you will get a symbol reference error and FALSE will
be returned.
To set a symbol value, get the symbol with tmpl_scope_get() and assign
a value using tmpl_scope_assign_value() or similar methods.
Parameters
stream-
Type:
GOutputStreamA
GOutputStreamto write the results to.The data is owned by the caller of the method. scope-
Type:
TmplScopeA
TmplScopecontaining state for the template, orNULL.The argument can be NULL.The data is owned by the caller of the method. cancellable-
Type:
GCancellableAn optional cancellable for the operation.
The argument can be NULL.The data is owned by the caller of the method. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.