expand


Description:

public bool expand (OutputStream stream, Scope? scope, Cancellable? cancellable = null) throws Error

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 @get and assign a value using tmpl_scope_assign_value or similar methods.

Parameters:

this

A TmplTemplate.

stream

a OutputStream to write the results to

scope

A Scope containing state for the template, or null.

cancellable

An optional cancellable for the operation.

Returns:

true if successful, otherwise false and throws is set.