|
ISLEman
|
Abstract interface for a template context. More...
#include <template.h>
Public Member Functions | |
| virtual void | push ()=0 |
| Push a new scope on the stack. More... | |
| virtual void | pop ()=0 |
| Pop the current scope from the stack. More... | |
| virtual void | set (const char *name, const TemplateVariant &v)=0 |
| Sets a value in the current scope. More... | |
| virtual TemplateVariant | get (const QCString &name) const =0 |
| Gets the value for a given key. More... | |
| virtual const TemplateVariant * | getRef (const QCString &name) const =0 |
| Returns a pointer to the value corresponding to a given key. More... | |
| virtual void | setOutputDirectory (const QCString &dir)=0 |
| When files are created (i.e. More... | |
| virtual void | setEscapeIntf (const QCString &extension, TemplateEscapeIntf *intf)=0 |
| Sets the interface that will be used for escaping the result of variable expansion before writing it to the output. | |
| virtual void | setSpacelessIntf (TemplateSpacelessIntf *intf)=0 |
| Sets the interface that will be used inside a spaceless block to remove any redundant whitespace. | |
Abstract interface for a template context.
A Context consists of a stack of dictionaries. A dictionary consists of a mapping of string keys onto TemplateVariant values. A key is searched starting with the dictionary at the top of the stack and searching downwards until it is found. The stack is used to create local scopes.
|
pure virtual |
Gets the value for a given key.
| [in] | name | The name of key. |
Implemented in TemplateContextImpl.
|
pure virtual |
Returns a pointer to the value corresponding to a given key.
| [in] | name | The name of key. |
Implemented in TemplateContextImpl.
|
pure virtual |
Pop the current scope from the stack.
Implemented in TemplateContextImpl.
|
pure virtual |
Push a new scope on the stack.
Implemented in TemplateContextImpl.
|
pure virtual |
Sets a value in the current scope.
| [in] | name | The name of the value; the key in the dictionary. |
| [in] | v | The value associated with the key. |
Implemented in TemplateContextImpl.
|
pure virtual |
When files are created (i.e.
by {% create ... %}) they written to the directory dir.
Implemented in TemplateContextImpl.
1.8.12