ISLEman
Public Member Functions | List of all members
TemplateContextImpl Class Reference

Internal class representing the implementation of a template context. More...

Inheritance diagram for TemplateContextImpl:
TemplateContext

Public Member Functions

 TemplateContextImpl (const TemplateEngine *e)
 
void push ()
 Push a new scope on the stack. More...
 
void pop ()
 Pop the current scope from the stack. More...
 
void set (const char *name, const TemplateVariant &v)
 Sets a value in the current scope. More...
 
TemplateVariant get (const QCString &name) const
 Gets the value for a given key. More...
 
const TemplateVariantgetRef (const QCString &name) const
 Returns a pointer to the value corresponding to a given key. More...
 
void setOutputDirectory (const QCString &dir)
 When files are created (i.e. More...
 
void setEscapeIntf (const QCString &ext, TemplateEscapeIntf *intf)
 Sets the interface that will be used for escaping the result of variable expansion before writing it to the output.
 
void selectEscapeIntf (const QCString &ext)
 
void setActiveEscapeIntf (TemplateEscapeIntf *intf)
 
void setSpacelessIntf (TemplateSpacelessIntf *intf)
 Sets the interface that will be used inside a spaceless block to remove any redundant whitespace.
 
TemplateBlockContextblockContext ()
 
TemplateVariant getPrimary (const QCString &name) const
 
void setLocation (const QCString &templateName, int line)
 
QCString templateName () const
 
int line () const
 
QCString outputDirectory () const
 
TemplateEscapeIntfescapeIntf () const
 
TemplateSpacelessIntfspacelessIntf () const
 
void enableSpaceless (bool b)
 
bool spacelessEnabled () const
 
void enableTabbing (bool b)
 
bool tabbingEnabled () const
 
bool needsRecoding () const
 
QCString encoding () const
 
void setEncoding (const QCString &file, int line, const QCString &enc)
 
QCString recode (const QCString &s)
 
void warn (const char *fileName, int line, const char *fmt,...) const
 
void openSubIndex (const QCString &indexName)
 
void closeSubIndex (const QCString &indexName)
 
void addIndexEntry (const QCString &indexName, const QValueList< TemplateKeyValue > &arguments)
 

Detailed Description

Internal class representing the implementation of a template context.

Member Function Documentation

§ get()

TemplateVariant TemplateContextImpl::get ( const QCString name) const
virtual

Gets the value for a given key.

Parameters
[in]nameThe name of key.
Returns
The value, which can be an invalid variant in case the key was not found.

Implements TemplateContext.

§ getRef()

const TemplateVariant * TemplateContextImpl::getRef ( const QCString name) const
virtual

Returns a pointer to the value corresponding to a given key.

Parameters
[in]nameThe name of key.
Returns
A pointer to the value, or 0 in case the key was not found.

Implements TemplateContext.

§ pop()

void TemplateContextImpl::pop ( )
virtual

Pop the current scope from the stack.

Implements TemplateContext.

§ push()

void TemplateContextImpl::push ( )
virtual

Push a new scope on the stack.

Implements TemplateContext.

§ set()

void TemplateContextImpl::set ( const char *  name,
const TemplateVariant v 
)
virtual

Sets a value in the current scope.

Parameters
[in]nameThe name of the value; the key in the dictionary.
[in]vThe value associated with the key.
Note
When a given key is already present, its value will be replaced by v

Implements TemplateContext.

§ setOutputDirectory()

void TemplateContextImpl::setOutputDirectory ( const QCString dir)
inlinevirtual

When files are created (i.e.

by {% create ... %}) they written to the directory dir.

Implements TemplateContext.


The documentation for this class was generated from the following file: