Commit 532a5087 authored by Dominik Charousset's avatar Dominik Charousset

Add missing member functions and specializations

parent 54bcceef
......@@ -18,6 +18,7 @@
#pragma once
#include "caf/actor_traits.hpp"
#include "caf/mixin/requester.hpp"
#include "caf/mixin/sender.hpp"
#include "caf/scheduled_actor.hpp"
......@@ -101,6 +102,14 @@ public:
self_->demonitor(x);
}
message_id new_request_id(message_priority mp) {
return self_->new_request_id(mp);
}
void request_response_timeout(const duration& d, message_id mid) {
return self_->request_response_timeout(d, mid);
}
response_promise make_response_promise() {
return self_->make_response_promise();
}
......@@ -114,6 +123,20 @@ public:
return self_->response(std::forward<Ts>(xs)...);
}
template <class... Ts>
void eq_impl(Ts&&... xs) {
self_->eq_impl(std::forward<Ts>(xs)...);
}
void add_awaited_response_handler(message_id response_id, behavior bhvr) {
return self_->add_awaited_response_handler(response_id, std::move(bhvr));
}
void add_multiplexed_response_handler(message_id response_id, behavior bhvr) {
return self_->add_multiplexed_response_handler(response_id,
std::move(bhvr));
}
/// Returns a pointer to the sender of the current message.
/// @pre `current_mailbox_element() != nullptr`
strong_actor_ptr& current_sender() {
......@@ -144,4 +167,17 @@ private:
scheduled_actor* self_;
};
template <class... Sigs>
struct actor_traits<typed_actor_view<Sigs...>> {
static constexpr bool is_dynamically_typed = false;
static constexpr bool is_statically_typed = true;
static constexpr bool is_blocking = false;
static constexpr bool is_non_blocking = true;
static constexpr bool is_incomplete = false;
};
} // namespace caf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment