21#include <pulsar/Message.h>
30 using Decoder = std::function<T(
const char*, std::size_t)>;
35 const Message& message, Decoder decoder = [](
const char*, std::size_t) {
return T{}; })
36 :
Message(message), decoder_(decoder) {}
38 T getValue()
const {
return decoder_(
static_cast<const char*
>(
getData()),
getLength()); }
std::size_t getLength() const
const void * getData() const
Definition TypedMessage.h:28
Definition Authentication.h:31