5 #ifndef CUTELYST_ENGINE_H 6 #define CUTELYST_ENGINE_H 8 #include <Cutelyst/Headers> 9 #include <Cutelyst/cutelyst_global.h> 11 #include <QHostAddress> 41 virtual int workerId()
const = 0;
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;
213 #endif // CUTELYST_ENGINE_H
static QString camelCaseHeader(const QString &headerKey)
virtual int workerId() const =0
The id is the number of the spawned engine process, a single process workerId = 0, two process 0 for the first 1 for the second.
bool isLetter() const const
static void camelCaseByteArrayHeader(QByteArray &key)
The Cutelyst namespace holds all public Cutelyst API.
QChar toLower() const const
The Cutelyst Application.
int workerCore() const
Each worker process migth have a number of worker cores (threads), a single process with two worker ...
bool isZeroWorker() const