5#ifndef INKSCAPE_UTIL_FUNCLOG_H
6#define INKSCAPE_UTIL_FUNCLOG_H
38 using Fd =
typename std::decay<F>::type;
40 new (entry)
Entry<Fd>(std::forward<F>(f));
43 entry->
next =
nullptr;
74 std::rethrow_exception(std::current_exception());
96 template <
typename Fd>
100 template <
typename F>
112 void reset() noexcept;
A FuncLog is effectively a std::vector<std::function<void()>>, with the ability to hold move-only fun...
void exec()
Execute and destroy each callable in the log.
FuncLog & operator=(FuncLog &&other) noexcept
FuncLog(FuncLog &&other) noexcept
void clear()
Destroy all callables in the log without executing them.
void operator()()
Convenience alias for exec().
void movefrom(FuncLog &other) noexcept
static void destroy_and_advance(Header *&h) noexcept
void emplace(F &&f)
Append a callable object to the log.
static void destroy_from(Header *h)
void exec_while(C &&c)
Execute and destroy each callable in the log while condition c() is true, then destroy the rest.
A Pool is a block allocator with the following characteristics:
std::byte * allocate(std::size_t size, std::size_t alignment)
Allocate a block of the given size and alignment.
Miscellaneous supporting code.
Helper class to stream background task notifications as a series of messages.
void operator()() override