5#ifndef CUTELYST_ENGINE_H
6#define CUTELYST_ENGINE_H
8#include <Cutelyst/Headers>
9#include <Cutelyst/cutelyst_global.h>
11#include <QHostAddress>
46 int workerCore()
const;
55 inline bool isZeroWorker()
const;
60 QVariantMap opts()
const;
67 QVariantMap config(
const QString &entity)
const;
72 void setConfig(
const QVariantMap &config);
77 static QVariantMap loadIniConfig(
const QString &filename);
82 static QVariantMap loadJsonConfig(
const QString &filename);
89 virtual quint64 time();
109 bool lastWasLetter =
false;
110 for (
int i = 0; i < key.
size(); ++i) {
114 lastWasLetter =
false;
115 }
else if (lastWasLetter) {
118 lastWasLetter =
true;
132 bool lastWasLetter =
false;
133 for (
int i = 0; i < key.
size(); ++i) {
137 lastWasLetter =
false;
138 }
else if (lastWasLetter) {
141 lastWasLetter =
true;
149 static const char *httpStatusMessage(quint16 status,
int *len =
nullptr);
171 bool initApplication();
185 bool postForkApplication();
192 EnginePrivate *d_ptr;
203 virtual bool init() = 0;
The Cutelyst Application.
static QString camelCaseHeader(const QString &headerKey)
static void camelCaseByteArrayHeader(QByteArray &key)
int workerCore() const
Each worker process migth have a number of worker cores (threads), a single process with two worker t...
virtual int workerId() const =0
The id is the number of the spawned engine process, a single process workerId = 0,...
bool isZeroWorker() const
void processRequestAsync(Cutelyst::EngineRequest *request)
The Cutelyst namespace holds all public Cutelyst API.
bool isLetter() const const
QChar toLower() const const