MagicSmoke  $VERSION$
MStickRenderer Class Reference

A Twig-like renderer for HTML pages or other text based documents. More...

#include <stick.h>

Public Member Functions

 MStickRenderer ()
 instantiate the renderer More...
 
virtual ~MStickRenderer ()
 clean up More...
 
virtual QVariant property (QString name) const
 returns a specific property or a NULL variant if not found More...
 
virtual QStringList propertyNames () const
 returns the names of all known properties More...
 
virtual void removeProperty (QString name)
 deletes a property/variable More...
 
virtual QString render ()
 executes one rendering run on the template and returns the result as string More...
 
virtual void setProperties (QMap< QString, QVariant >properties)
 makes several properties available as variables in the renderer More...
 
virtual void setProperty (QString name, QVariant value)
 makes a property available as a variable in the renderer More...
 
virtual void setTemplate (QString text)
 sets the template as plain text More...
 
virtual void setTemplateFile (QString filename)
 sets the template text file More...
 

Detailed Description

A Twig-like renderer for HTML pages or other text based documents.

Constructor & Destructor Documentation

MStickRenderer::MStickRenderer ( )

instantiate the renderer

MStickRenderer::~MStickRenderer ( )
virtual

clean up

Member Function Documentation

QVariant MStickRenderer::property ( QString  name) const
virtual

returns a specific property or a NULL variant if not found

QStringList MStickRenderer::propertyNames ( ) const
virtual

returns the names of all known properties

void MStickRenderer::removeProperty ( QString  name)
virtual

deletes a property/variable

QString MStickRenderer::render ( )
virtual

executes one rendering run on the template and returns the result as string

References MStickToken::render().

void MStickRenderer::setProperties ( QMap< QString, QVariant >  properties)
virtual

makes several properties available as variables in the renderer

void MStickRenderer::setProperty ( QString  name,
QVariant  value 
)
virtual

makes a property available as a variable in the renderer

void MStickRenderer::setTemplate ( QString  text)
virtual

sets the template as plain text

References MStickTokenizer::createTokens().

Referenced by setTemplateFile().

void MStickRenderer::setTemplateFile ( QString  filename)
virtual

sets the template text file

References setTemplate().


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