Grantlee
5.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
templates
lib
filterexpression.h
1
/*
2
This file is part of the Grantlee template system.
3
4
Copyright (c) 2009,2010 Stephen Kelly <steveire@gmail.com>
5
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either version
9
2.1 of the Licence, or (at your option) any later version.
10
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library. If not, see <http://www.gnu.org/licenses/>.
18
19
*/
20
21
#ifndef GRANTLEE_FILTEREXPRESSION_H
22
#define GRANTLEE_FILTEREXPRESSION_H
23
24
#include "variable.h"
25
26
#include "grantlee_templates_export.h"
27
28
namespace
Grantlee
29
{
30
class
Filter;
31
class
OutputStream;
32
class
Parser;
33
struct
Token;
34
35
class
FilterExpressionPrivate;
36
38
118
class
GRANTLEE_TEMPLATES_EXPORT
FilterExpression
119
{
120
public
:
124
FilterExpression
();
125
130
FilterExpression
(
const
QString &varString,
Grantlee::Parser
*parser);
131
135
FilterExpression
(
const
FilterExpression
&other);
136
140
~
FilterExpression
();
141
145
FilterExpression
&operator=(
const
FilterExpression
&other);
146
150
Variable
variable()
const
;
151
156
QVariant resolve(
OutputStream
*stream,
Context
*c)
const
;
157
161
QVariant resolve(
Context
*c)
const
;
162
167
bool
isTrue(
Context
*c)
const
;
168
175
QVariantList toList(
Context
*c)
const
;
176
183
bool
isValid()
const
;
184
185
#ifndef Q_QDOC
186
190
QStringList filters()
const
;
191
#endif
192
193
private
:
194
Q_DECLARE_PRIVATE(
FilterExpression
)
195
FilterExpressionPrivate *
const
d_ptr;
196
};
197
}
198
199
#endif
Grantlee::Context
The Context class holds the context to render a template with.
Definition:
context.h:117
Grantlee::Parser
The Parser class processes a string template into a tree of nodes.
Definition:
parser.h:49
Grantlee::Variable
A container for static variables defined in Templates.
Definition:
variable.h:53
Grantlee::OutputStream
The OutputStream class is used to render templates to a QTextStream.
Definition:
outputstream.h:82
Grantlee::FilterExpression
A FilterExpression object represents a filter expression in a template.
Definition:
filterexpression.h:118
Grantlee
The Grantlee namespace holds all public Grantlee API.
Definition:
Mainpage.dox:7
Generated by
1.8.11