C++ Web Framework  3.0
cstlcompilerattributes.h
1 /*
2  Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler
3  Distributed under MIT license, or public domain if desired and
4  recognized in your jurisdiction.
5  See file LICENSE for detail.
6 */
7 
8 #ifndef CSTLCOMPILERATTRIBUTES_H
9 #define CSTLCOMPILERATTRIBUTES_H
10 
11 #include <QMap>
12 #include <QString>
13 #include <QObject>
14 #include <QXmlStreamAttributes>
15 #include "properties.h"
16 #include "cppwebframework_global.h"
17 
18 CWF_BEGIN_NAMESPACE
22 class CPPWEBFRAMEWORKSHARED_EXPORT CSTLCompilerAttributes
23 {
24  QMap<QString, QObject *> &objects;
25 public:
26  explicit CSTLCompilerAttributes(QMap<QString, QObject *> &objects);
27  QString buildAttributes(QMap<QString, QString> &attr, bool keyValue = true);
28  void compileAttributes(QMap<QString, QString> &attr);
29  void compile(QString &text, QString &outPutText);
30  QMap<QString, QString> getAttributes(const QXmlStreamAttributes &attributes);
31 };
32 
33 CWF_END_NAMESPACE
34 
35 #endif // CSTLCOMPILERATTRIBUTES_H
This class search for expressions #{obj.get} and compiles it.
Definition: cstlcompilerattributes.h:22