QtWebApp
template.h
Go to the documentation of this file.
1 
6 #ifndef TEMPLATE_H
7 #define TEMPLATE_H
8 
9 #include <QString>
10 #include <QIODevice>
11 #include <QTextCodec>
12 #include <QFile>
13 #include <QString>
14 #include "templateglobal.h"
15 
16 namespace stefanfrings {
17 
91 class DECLSPEC Template : public QString {
92 public:
93 
99  Template(const QString source, const QString sourceName);
100 
110  Template(QFile &file, const QTextCodec* textCodec);
111 
125  int setVariable(const QString name, const QString value);
126 
139  int setCondition(const QString name, bool value);
140 
152  int loop(QString name, const int repetitions);
153 
158  void enableWarnings(const bool enable=true);
159 
160 private:
161 
163  QString sourceName;
164 
166  bool warnings;
167 };
168 
169 } // end of namespace
170 
171 #endif // TEMPLATE_H
Enhanced version of QString for template processing.
Definition: template.h:91