5 #ifndef CUTELYST_ENGINE_H 6 #define CUTELYST_ENGINE_H 9 #include <QHostAddress> 11 #include <Cutelyst/cutelyst_global.h> 12 #include <Cutelyst/Headers> 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();
108 bool lastWasLetter =
false;
109 for (
int i = 0 ; i < key.
size() ; ++i) {
113 lastWasLetter =
false;
114 }
else if (lastWasLetter) {
117 lastWasLetter =
true;
130 bool lastWasLetter =
false;
131 for (
int i = 0 ; i < key.
size() ; ++i) {
135 lastWasLetter =
false;
136 }
else if (lastWasLetter) {
139 lastWasLetter =
true;
147 static const char *httpStatusMessage(quint16 status,
int *len =
nullptr);
169 bool initApplication();
183 bool postForkApplication();
190 EnginePrivate *d_ptr;
201 virtual bool init() = 0;
210 #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