|
Grantlee 0.1.9
|
A container for static variables defined in Templates. More...
#include <grantlee/variable.h>
Public Member Functions | |
| Variable () | |
| Variable (const QString &var) | |
| Variable (const Variable &other) | |
| ~Variable () | |
| bool | isConstant () const |
| bool | isTrue (Context *c) const |
| bool | isValid () const |
| Variable & | operator= (const Variable &other) |
| QVariant | resolve (Context *c) const |
This class is only relevant to Template tag authors.
When processing a template tag in a AbstractNodeFactory implementation, it will sometimes make sense to process arguments to the tag as Grantlee::Variables. Note that usually they should be processed as FilterExpression objects instead.
Arguments to the tag can be used to construct Variables, which may then be resolved into the objects they represent in the given Context in the render stage.
Definition at line 50 of file variable.h.
| Grantlee::Variable::Variable | ( | ) |
Constructs an invalid Variable
| Grantlee::Variable::Variable | ( | const QString & | var | ) | [explicit] |
Creates a Variable represented by the given var
| Grantlee::Variable::Variable | ( | const Variable & | other | ) |
Copy constructor
| Grantlee::Variable::~Variable | ( | ) |
Destructor
| bool Grantlee::Variable::isConstant | ( | ) | const |
| bool Grantlee::Variable::isTrue | ( | Context * | c | ) | const |
| bool Grantlee::Variable::isValid | ( | ) | const |
Returns whether this Variable is valid.
1.7.4