|
TreeFrogFramework 2.10
|
#include <QMetaType>#include <QIODevice>#include <QtGlobal>#include <version>#include "tfexception.h"#include "tfnamespace.h"#include "tdeclexport.h"#include <TDebug>#include <cstdint>#include <cstring>#include <functional>#include <algorithm>#include <format>
Go to the source code of this file.
Namespaces | |
| namespace | Tf |
Macros | |
| #define | T_DEFINE_CONTROLLER(TYPE) T_DEFINE_TYPE(TYPE) |
| #define | T_DEFINE_VIEW(TYPE) T_DEFINE_TYPE(TYPE) |
| #define | T_DEFINE_TYPE(TYPE) |
| #define | T_REGISTER_STREAM_OPERATORS(TYPE) |
| #define | T_DEFINE_PROPERTY(TYPE, PROPERTY) |
| #define | T_ATTRIBUTE_FORMAT(A, B) |
| #define | T_EXPORT(VAR) |
| #define | texport(VAR) T_EXPORT(VAR) |
| #define | T_EXPORT_UNLESS(VAR) |
| #define | texportUnless(VAR) T_EXPORT_UNLESS(VAR) |
| #define | T_FETCH(TYPE, VAR) TYPE VAR = variant(QLatin1String(#VAR)).value<TYPE>() |
| #define | tfetch(TYPE, VAR) T_FETCH(TYPE, VAR) |
| #define | T_FETCH_V(TYPE, VAR, DEFAULT) TYPE VAR = (hasVariant(QLatin1String(#VAR))) ? (variant(QLatin1String(#VAR)).value<TYPE>()) : (DEFAULT) |
| #define | tfetchv(TYPE, VAR, DEFAULT) T_FETCH_V(TYPE, VAR, DEFAULT) |
| #define | T_EHEX(VAR) |
| #define | tehex(VAR) T_EHEX(VAR) |
| #define | T_EHEX_V(VAR, DEFAULT) |
| #define | tehexv(VAR, DEFAULT) T_EHEX_V(VAR, DEFAULT) |
| #define | T_EHEX2(VAR, DEFAULT) T_EHEX_V(VAR, DEFAULT) |
| #define | tehex2(VAR, DEFAULT) T_EHEX2(VAR, DEFAULT) |
| #define | T_ECHOEX(VAR) |
| #define | techoex(VAR) T_ECHOEX(VAR) |
| #define | T_ECHOEX_V(VAR, DEFAULT) |
| #define | techoexv(VAR, DEFAULT) T_ECHOEX_V(VAR, DEFAULT) |
| #define | T_ECHOEX2(VAR, DEFAULT) T_ECHOEX_V(VAR, DEFAULT) |
| #define | techoex2(VAR, DEFAULT) T_ECHOEX2(VAR, DEFAULT) |
| #define | T_FLASH(VAR) |
| #define | tflash(VAR) T_FLASH(VAR) |
| #define | T_VARIANT(VAR) (variant(QLatin1String(#VAR)).toString()) |
| #define | tFatal TDebug(Tf::FatalLevel).fatal |
| #define | tError TDebug(Tf::ErrorLevel).error |
| #define | tWarn TDebug(Tf::WarnLevel).warn |
| #define | tInfo TDebug(Tf::InfoLevel).info |
| #define | tDebug TDebug(Tf::DebugLevel).debug |
| #define | tTrace TDebug(Tf::TraceLevel).trace |
Functions | |
| T_CORE_EXPORT TWebApplication * | Tf::app () noexcept |
| T_CORE_EXPORT TAppSettings * | Tf::appSettings () noexcept |
| T_CORE_EXPORT const QVariantMap & | Tf::conf (const QString &configName) noexcept |
| T_CORE_EXPORT void | Tf::msleep (int64_t msecs) noexcept |
| T_CORE_EXPORT int64_t | Tf::getMSecsSinceEpoch () |
| T_CORE_EXPORT uint32_t | Tf::rand32_r () noexcept |
| T_CORE_EXPORT uint64_t | Tf::rand64_r () noexcept |
| T_CORE_EXPORT uint64_t | Tf::random (uint64_t min, uint64_t max) noexcept |
| T_CORE_EXPORT uint64_t | Tf::random (uint64_t max) noexcept |
| T_CORE_EXPORT TCache * | Tf::cache () noexcept |
| T_CORE_EXPORT TAbstractController * | Tf::currentController () |
| const TAbstractController * | Tf::constCurrentController () |
| T_CORE_EXPORT TDatabaseContext * | Tf::currentDatabaseContext () |
| T_CORE_EXPORT QSqlDatabase & | Tf::currentSqlDatabase (int id) noexcept |
| T_CORE_EXPORT QMap< QByteArray, std::function< QObject *()> > * | Tf::objectFactories () noexcept |
| T_CORE_EXPORT QByteArray | Tf::lz4Compress (const char *data, int nbytes, int compressionLevel=1) noexcept |
| T_CORE_EXPORT QByteArray | Tf::lz4Compress (const QByteArray &data, int compressionLevel=1) noexcept |
| T_CORE_EXPORT QByteArray | Tf::lz4Uncompress (const char *data, int nbytes) noexcept |
| T_CORE_EXPORT QByteArray | Tf::lz4Uncompress (const QByteArray &data) noexcept |
| bool | Tf::strcmp (const QByteArray &str1, const QByteArray &str2) |
| template<typename... Args> | |
| void | Tf::fatal (const std::format_string< Args... > &fmt, Args &&... args) |
| template<typename... Args> | |
| void | Tf::error (const std::format_string< Args... > &fmt, Args &&... args) |
| template<typename... Args> | |
| void | Tf::warn (const std::format_string< Args... > &fmt, Args &&... args) |
| template<typename... Args> | |
| void | Tf::info (const std::format_string< Args... > &fmt, Args &&... args) |
| template<typename... Args> | |
| void | Tf::debug (const std::format_string< Args... > &fmt, Args &&... args) |
| template<typename... Args> | |
| void | Tf::trace (const std::format_string< Args... > &fmt, Args &&... args) |
Variables | |
| constexpr auto | TF_VERSION_STR = "2.10.0" |
| constexpr auto | TF_VERSION_NUMBER = 0x020a00 |
| constexpr auto | TF_SRC_REVISION = 2956 |
| constexpr auto | Tf::CR = "\x0d" |
| constexpr auto | Tf::LF = "\x0a" |
| constexpr auto | Tf::CRLF = "\x0d\x0a" |
| constexpr auto | Tf::CRLFCRLF = "\x0d\x0a\x0d\x0a" |
| #define T_ATTRIBUTE_FORMAT | ( | A, | |
| B | |||
| ) |
| #define T_DEFINE_CONTROLLER | ( | TYPE | ) | T_DEFINE_TYPE(TYPE) |
| #define T_DEFINE_PROPERTY | ( | TYPE, | |
| PROPERTY | |||
| ) |
| #define T_DEFINE_TYPE | ( | TYPE | ) |
| #define T_DEFINE_VIEW | ( | TYPE | ) | T_DEFINE_TYPE(TYPE) |
| #define T_ECHOEX | ( | VAR | ) |
| #define T_ECHOEX2 | ( | VAR, | |
| DEFAULT | |||
| ) | T_ECHOEX_V(VAR, DEFAULT) |
| #define T_ECHOEX_V | ( | VAR, | |
| DEFAULT | |||
| ) |
| #define T_EHEX | ( | VAR | ) |
| #define T_EHEX2 | ( | VAR, | |
| DEFAULT | |||
| ) | T_EHEX_V(VAR, DEFAULT) |
| #define T_EHEX_V | ( | VAR, | |
| DEFAULT | |||
| ) |
| #define T_EXPORT | ( | VAR | ) |
Exports the current value of a local variable named VAR from the controller context to view contexts.
| #define T_EXPORT_UNLESS | ( | VAR | ) |
Exports the current value of a local variable named VAR from the controller context to view contexts only if a local variable named VAR isn't exported.
| #define T_FETCH | ( | TYPE, | |
| VAR | |||
| ) | TYPE VAR = variant(QLatin1String(#VAR)).value<TYPE>() |
Creates a local variable named VAR with the type TYPE on the view and fetches the value of a variable named VAR exported in a controller context.
| #define T_FETCH_V | ( | TYPE, | |
| VAR, | |||
| DEFAULT | |||
| ) | TYPE VAR = (hasVariant(QLatin1String(#VAR))) ? (variant(QLatin1String(#VAR)).value<TYPE>()) : (DEFAULT) |
| #define T_FLASH | ( | VAR | ) |
| #define T_REGISTER_STREAM_OPERATORS | ( | TYPE | ) |
| #define T_VARIANT | ( | VAR | ) | (variant(QLatin1String(#VAR)).toString()) |
| #define tDebug TDebug(Tf::DebugLevel).debug |
| #define techoex | ( | VAR | ) | T_ECHOEX(VAR) |
| #define techoex2 | ( | VAR, | |
| DEFAULT | |||
| ) | T_ECHOEX2(VAR, DEFAULT) |
| #define techoexv | ( | VAR, | |
| DEFAULT | |||
| ) | T_ECHOEX_V(VAR, DEFAULT) |
| #define tehex | ( | VAR | ) | T_EHEX(VAR) |
| #define tehex2 | ( | VAR, | |
| DEFAULT | |||
| ) | T_EHEX2(VAR, DEFAULT) |
| #define tehexv | ( | VAR, | |
| DEFAULT | |||
| ) | T_EHEX_V(VAR, DEFAULT) |
| #define tError TDebug(Tf::ErrorLevel).error |
| #define texport | ( | VAR | ) | T_EXPORT(VAR) |
Exports the current value of a local variable named VAR from the controller context to view contexts.
| #define texportUnless | ( | VAR | ) | T_EXPORT_UNLESS(VAR) |
Exports the current value of a local variable named VAR from the controller context to view contexts only if a local variable named VAR isn't exported.
| #define tFatal TDebug(Tf::FatalLevel).fatal |
| #define tfetch | ( | TYPE, | |
| VAR | |||
| ) | T_FETCH(TYPE, VAR) |
Creates a local variable named VAR with the type TYPE on the view and fetches the value of a variable named VAR exported in a controller context.
| #define tfetchv | ( | TYPE, | |
| VAR, | |||
| DEFAULT | |||
| ) | T_FETCH_V(TYPE, VAR, DEFAULT) |
| #define tflash | ( | VAR | ) | T_FLASH(VAR) |
| #define tInfo TDebug(Tf::InfoLevel).info |
| #define tTrace TDebug(Tf::TraceLevel).trace |
| #define tWarn TDebug(Tf::WarnLevel).warn |
|
constexpr |
|
constexpr |
|
constexpr |