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 Q_DECL_DEPRECATED_X(
"Will be removed in new major release")
150 static const
char *httpStatusMessage(quint16 status,
int *len =
nullptr);
172 bool initApplication();
186 bool postForkApplication();
193 EnginePrivate *d_ptr;
204 virtual
bool init() = 0;
209 return !workerId() && !workerCore();
214 #endif // CUTELYST_ENGINE_H
static QString camelCaseHeader(const QString &headerKey)
bool isLetter() const const
static void camelCaseByteArrayHeader(QByteArray &key)
The Cutelyst namespace holds all public Cutelyst API.
QChar toLower() const const
The Cutelyst Application.