17 #ifndef NURIA_TEMPLATEPROGRAM_HPP
18 #define NURIA_TEMPLATEPROGRAM_HPP
20 #include <nuria/callback.hpp>
21 #include "templateerror.hpp"
22 #include "twig_global.hpp"
23 #include <QSharedData>
24 #include <QStringList>
28 class TemplateProgramPrivate;
86 bool isValid ()
const;
92 QStringList dependencies ()
const;
97 QStringList neededVariables ()
const;
100 QVariant value (
const QString &variable)
const;
106 bool setValue (
const QString &variable,
const QVariant &value);
109 QLocale locale ()
const;
112 void setLocale (
const QLocale &locale);
125 void addFunction (
const QString &name,
const Callback &
function);
130 bool hasFunction (
const QString &name);
139 bool canRender ()
const;
158 bool checkVariable (
int index)
const;
160 QSharedDataPointer< TemplateProgramPrivate > d;
168 #endif // NURIA_TEMPLATEPROGRAM_HPP
A modern style callback mechanism which can be bound to various method types including slots...
Definition: callback.hpp:140
Container for exposing Twig errors to user code.
Definition: templateerror.hpp:75
Definition: abstractsessionmanager.hpp:24
Templating engine for rendering Twig code.
Definition: templateengine.hpp:174
Represents a compiled Twig code program.
Definition: templateprogram.hpp:70