Cutelee 6.1.0
ScriptableNodeFactory Class Reference
Inheritance diagram for ScriptableNodeFactory:

Public Member Functions

 ScriptableNodeFactory (QObject *parent={})
NodegetNode (const QString &tagContent, Parser *p={}) const override
void setEngine (Cutelee::Engine *engine) override
void setFactory (const QJSValue &factoryMethod)
void setScriptEngine (QJSEngine *engine)
Public Member Functions inherited from Cutelee::AbstractNodeFactory
 AbstractNodeFactory (QObject *parent={})
 ~AbstractNodeFactory () override

Additional Inherited Members

Protected Member Functions inherited from Cutelee::AbstractNodeFactory
QList< FilterExpressiongetFilterExpressionList (const QStringList &list, Parser *p) const
Q_INVOKABLE QStringList smartSplit (const QString &str) const

Detailed Description

Definition at line 59 of file scriptablenode.h.

Constructor & Destructor Documentation

◆ ScriptableNodeFactory()

ScriptableNodeFactory::ScriptableNodeFactory ( QObject * parent = {})

Definition at line 65 of file scriptablenode.cpp.

Member Function Documentation

◆ getNode()

Node * ScriptableNodeFactory::getNode ( const QString & tagContent,
Parser * p = {} ) const
overridevirtual

This method should be reimplemented to return a Node which can be rendered.

The tagContent is the content of the tag including the tag name and arguments. For example, if the template content is {% my_tag arg1 arg2 %}, the tagContent will be "my_tag arg1 arg2".

The Parser p is available and can be advanced if appropriate. For example, if the tag has an end tag, the parser can be advanced to the end tag.

See also
tags

Implements Cutelee::AbstractNodeFactory.

Definition at line 85 of file scriptablenode.cpp.

◆ setEngine()

void ScriptableNodeFactory::setEngine ( Cutelee::Engine * engine)
override

Definition at line 75 of file scriptablenode.cpp.

◆ setFactory()

void ScriptableNodeFactory::setFactory ( const QJSValue & factoryMethod)

Definition at line 80 of file scriptablenode.cpp.

◆ setScriptEngine()

void ScriptableNodeFactory::setScriptEngine ( QJSEngine * engine)

Definition at line 70 of file scriptablenode.cpp.