25 #ifndef TASKOLIB_FORMAT_H_
26 #define TASKOLIB_FORMAT_H_
28 #include <fmt/format.h>
35 using namespace std::literals;
37 template<>
struct fmt::formatter<
task::Message> {
38 constexpr
auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
41 template <
typename FormatContext>
43 std::stringstream ss{ };
45 return format_to(ctx.out(),
"{}", ss.str());
49 template<>
struct fmt::formatter<
task::Timeout> {
50 constexpr
auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
53 template <
typename FormatContext>
55 std::stringstream ss{ };
57 return format_to(ctx.out(),
"{}", ss.str());
62 constexpr
auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
65 template <
typename FormatContext>
Declaration of the Message class.
Declaration of the Timeout class.
A message carrying some text, a timestamp, and a type, to be transported with a message queue between...
Definition: Message.h:45
A type for storing a timeout duration.
Definition: Timeout.h:72
Namespace task contains all Taskolib functions and classes.
Definition: CommChannel.h:33
std::string to_string(Step::Type type)
Return a lower-case name for a step type ("action", "if", "end").
Definition: Step.cc:287
std::chrono::time_point< Clock > TimePoint
Definition: time_types.h:34
Declaration of time-related types.