My Project
|
Engine to create templates and template contexts. More...
#include <template.h>
Classes | |
class | Private |
Private data of the template engine. More... | |
Public Member Functions | |
TemplateEngine () | |
~TemplateEngine () | |
TemplateContext * | createContext () const |
void | destroyContext (TemplateContext *ctx) |
Template * | loadByName (const QCString &fileName, int fromLine) |
void | unload (Template *t) |
void | printIncludeContext (const char *fileName, int line) const |
void | setTemplateDir (const char *dirName) |
Private Member Functions | |
void | enterBlock (const QCString &fileName, const QCString &blockName, int line) |
void | leaveBlock () |
void | setOutputExtension (const char *extension) |
QCString | outputExtension () const |
Private Attributes | |
Private * | p |
Friends | |
class | TemplateNodeBlock |
class | TemplateNodeCreate |
Engine to create templates and template contexts.
Definition at line 559 of file template.h.
TemplateEngine::TemplateEngine | ( | ) |
TemplateEngine::~TemplateEngine | ( | ) |
TemplateContext * TemplateEngine::createContext | ( | ) | const |
Creates a new context that can be using to render a template.
Definition at line 5204 of file template.cpp.
Referenced by generateOutputViaTemplate().
void TemplateEngine::destroyContext | ( | TemplateContext * | ctx | ) |
Destroys a context created via createContext().
[in] | ctx | The context. |
Definition at line 5209 of file template.cpp.
Referenced by generateOutputViaTemplate().
|
private |
Definition at line 5224 of file template.cpp.
References TemplateEngine::Private::enterBlock(), and p.
Referenced by TemplateNodeBlock::render().
|
private |
Definition at line 5229 of file template.cpp.
References TemplateEngine::Private::leaveBlock(), and p.
Referenced by TemplateNodeBlock::render().
Template * TemplateEngine::loadByName | ( | const QCString & | fileName, |
int | fromLine | ||
) |
Creates a new template whose contents are in a file.
[in] | fileName | The name of the file containing the template data |
[in] | fromLine | The line number of the statement that triggered the load |
Definition at line 5214 of file template.cpp.
References TemplateEngine::Private::loadByName(), and p.
Referenced by generateOutputViaTemplate(), TemplateNodeExtend::render(), TemplateNodeInclude::render(), and TemplateNodeCreate::render().
|
private |
Returns the output extension, set via setOutputExtension()
Definition at line 5244 of file template.cpp.
References TemplateEngine::Private::outputExtension(), and p.
void TemplateEngine::printIncludeContext | ( | const char * | fileName, |
int | line | ||
) | const |
Prints the current template file include stack
Definition at line 5234 of file template.cpp.
References p, and TemplateEngine::Private::printIncludeContext().
Referenced by TemplateLexer::tokenize(), TemplateContextImpl::warn(), and TemplateParser::warn().
|
private |
Sets the extension of the output file. This is used to control the format of 'special' tags in the template
Definition at line 5239 of file template.cpp.
References p, and TemplateEngine::Private::setOutputExtension().
Referenced by TemplateNodeCreate::render().
void TemplateEngine::setTemplateDir | ( | const char * | dirName | ) |
Sets the search directory where to look for template files
Definition at line 5249 of file template.cpp.
References p, and TemplateEngine::Private::setTemplateDir().
Referenced by generateOutputViaTemplate().
void TemplateEngine::unload | ( | Template * | t | ) |
Indicates that template t is no longer needed. The engine may decide to delete it.
Definition at line 5219 of file template.cpp.
References p, and TemplateEngine::Private::unload().
Referenced by generateOutputViaTemplate(), TemplateNodeExtend::render(), TemplateNodeInclude::render(), and TemplateNodeCreate::render().
|
friend |
Definition at line 597 of file template.h.
|
friend |
Definition at line 598 of file template.h.
|
private |
Definition at line 611 of file template.h.
Referenced by enterBlock(), leaveBlock(), loadByName(), outputExtension(), printIncludeContext(), setOutputExtension(), setTemplateDir(), TemplateEngine(), unload(), and ~TemplateEngine().