18 #ifndef CUTELYST_ENGINE_H
19 #define CUTELYST_ENGINE_H
22 #include <QHostAddress>
24 #include <Cutelyst/cutelyst_global.h>
25 #include <Cutelyst/Headers>
54 virtual int workerId()
const = 0;
59 int workerCore()
const;
68 inline bool isZeroWorker()
const;
73 QVariantMap opts()
const;
80 QVariantMap config(
const QString &entity)
const;
85 void setConfig(
const QVariantMap &config);
90 static QVariantMap loadIniConfig(
const QString &filename);
95 static QVariantMap loadJsonConfig(
const QString &filename);
102 virtual quint64 time();
121 bool lastWasLetter =
false;
122 for (
int i = 0 ; i < key.
size() ; ++i) {
126 lastWasLetter =
false;
127 }
else if (lastWasLetter) {
129 }
else if (c.isLetter()) {
130 lastWasLetter =
true;
143 bool lastWasLetter =
false;
144 for (
int i = 0 ; i < key.
size() ; ++i) {
148 lastWasLetter =
false;
149 }
else if (lastWasLetter) {
152 lastWasLetter =
true;
160 static const char *httpStatusMessage(quint16 status,
int *len =
nullptr);
182 bool initApplication();
196 bool postForkApplication();
203 EnginePrivate *d_ptr;
214 virtual
bool init() = 0;
217 inline
bool Engine::isZeroWorker()
const {
218 return !workerId() && !workerCore();
223 #endif // CUTELYST_ENGINE_H
static QString camelCaseHeader(const QString &headerKey)
static void camelCaseByteArrayHeader(QByteArray &key)
The Cutelyst Application.