|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Provides convenience methods for string formatting using C++20 <format>. More...
#include <formatter.h>

Static Public Member Functions | |
| template<typename... FormatArgs> | |
| static auto | format (const char *formats, const FormatArgs &... args) -> std::string |
| Formats a narrow-character string with the given arguments. | |
| template<typename... FormatArgs> | |
| static auto | format (const wchar_t *formats, const FormatArgs &... args) -> std::wstring |
| Formats a wide-character string with the given arguments. | |
| template<typename OutputIt , typename... FormatArgs> | |
| static auto | format_to (OutputIt out, const char *formats, const FormatArgs &... args) -> OutputIt |
| Formats a narrow-character string directly to an output iterator. | |
| template<typename OutputIt , typename... FormatArgs> | |
| static auto | format_to (OutputIt out, const wchar_t *formats, const FormatArgs &... args) -> OutputIt |
| Formats a wide-character string directly to an output iterator. | |
Provides convenience methods for string formatting using C++20 <format>.
The formatter class offers static functions to format strings (both narrow and wide) into a std::string / std::wstring, or directly to an output iterator.
Definition at line 121 of file formatter.h.
|
inlinestatic |
Formats a narrow-character string with the given arguments.
| FormatArgs | Parameter pack of argument types. |
| formats | A format string (e.g. "Name: {}, Age: {}"). |
| args | The arguments to substitute into formats. |
std::string containing the formatted result. Definition at line 132 of file formatter.h.
Referenced by create_default(), create_default(), demo_basic_cancellation(), demo_immediate_vs_graceful(), demo_non_cooperative_job(), demo_pool_level_cancellation(), kcenon::thread::thread_worker::do_work(), initialize_logger(), main(), main(), kcenon::thread::thread_worker::on_stop_requested(), kcenon::thread::thread_pool::remove_workers_internal(), kcenon::thread::thread_pool::stop(), store_job(), store_job(), and kcenon::thread::job::to_string().

|
inlinestatic |
Formats a wide-character string with the given arguments.
| FormatArgs | Parameter pack of argument types. |
| formats | A wide format string (e.g. L"Count: {}, Value: {}"). |
| args | The arguments to substitute into formats. |
std::wstring containing the formatted result. Definition at line 145 of file formatter.h.
|
inlinestatic |
Formats a narrow-character string directly to an output iterator.
| OutputIt | The type of the output iterator (e.g. a back_inserter for a container). |
| FormatArgs | Parameter pack of argument types. |
| out | The output iterator where formatted text will be written. |
| formats | The narrow format string. |
| args | The arguments to substitute into formats. |
This method is useful when writing to a buffer, a container, or custom iterators.
Definition at line 162 of file formatter.h.
Referenced by kcenon::thread::thread_pool::to_string().

|
inlinestatic |
Formats a wide-character string directly to an output iterator.
| OutputIt | The type of the output iterator (e.g. a back_inserter for a wstring). |
| FormatArgs | Parameter pack of argument types. |
| out | The output iterator where formatted text will be written. |
| formats | The wide format string. |
| args | The arguments to substitute into formats. |
Definition at line 178 of file formatter.h.