|
lintel 0.2.0
|
Namespaces | |
| namespace | datetime |
| namespace | db |
| namespace | di |
| namespace | HttpClientHelper |
| namespace | json |
| namespace | postgresql |
| namespace | shm |
| namespace | sqlite |
Typedefs | |
| using | ProcessId = std::int64_t |
| using | KeyEvent = std::pair< KeyType, char > |
| using | SymbolEvent = std::pair< Symbol, std::string > |
Enumerations | |
| enum | ShutdownPriority { DEFAULT = 0 , PROCESS_SERVICE = 1 } |
| enum class | LogLevel : std::uint8_t { trace = 0 , debug = 1 , info = 2 , warn = 3 , error = 4 , critical = 5 , off = 6 } |
| enum | SharedMemoryType { Map , Vector , Array , Object } |
| enum class | KeyType { Ascii , Up , Down , Left , Right , Backspace , Canc , Home , End , Ret , Eof , CtrlC , CtrlR , Ignored } |
| enum class | Symbol { Nothing , Command , Up , Down , Tab , Eof , CtrlC , CtrlR } |
Functions | |
| ProcessId | currentProcessId () noexcept |
| bool | localTime (std::time_t time, std::tm &out) noexcept |
| std::string | homeDirectory () |
| constexpr char | pathListSeparator () noexcept |
| template<typename T > | |
| constexpr std::string_view | type_name () |
LoggerService class for easier logging in process itself
This public header parses only <format>. spdlog is hidden behind a forward declaration and stays in LoggerService.cpp. The variadic log() applies std::format's template-elimination idea (std::format -> std::vformat): the template only boxes its arguments with std::make_format_args and forwards them to the non-template logImpl(), so formatting and spdlog are compiled once instead of at every call site.
| using lintel::KeyEvent = typedef std::pair<KeyType, char> |
Pair of key type and ASCII character
| using lintel::ProcessId = typedef std::int64_t |
Portable process id type.
POSIX uses pid_t, Windows uses DWORD. A fixed 64-bit type keeps the value lossless on both sides and lets the DTOs (JSON "process_id") stay identical across platforms without dragging <Windows.h> into public headers.
| using lintel::SymbolEvent = typedef std::pair<Symbol, std::string> |
Pair of symbol and associated string data
|
strong |
|
strong |
Log levels used by LoggerService and the LOG_* macros. The values intentionally match spdlog::level::level_enum.
| Enumerator | |
|---|---|
| trace | |
| debug | |
| info | |
| warn | |
| error | |
| critical | |
| off | |
|
strong |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Thread-safe local-time conversion.
Wraps localtime_r() (POSIX) resp. localtime_s() (MSVC, argument order reversed) so callers do not have to branch.
| time | the time to convert |
| out | receives the broken-down local time |
|
constexpr |
Return a human-readable name for the given type at compile time.
| T | the type to name |