void publish_impl(abstract_actor_ptr ptr, std::unique_ptr<acceptor> aptr) { // begin the scenes, we serialze/deserialize as actor actor whom{raw_access::unsafe_cast(ptr.get())}; CPPA_LOGF_TRACE(CPPA_TARG(whom, to_string) << ", " << CPPA_MARG(aptr, get)); if (!whom) return; get_actor_registry()->put(whom->id(), detail::raw_access::get(whom)); auto mm = get_middleman(); auto addr = whom.address(); auto sigs = whom->interface(); mm->register_acceptor(addr, new peer_acceptor(mm, move(aptr), addr, move(sigs))); }
static void unsafe_assign(T& lhs, const abstract_actor_ptr& ptr) { lhs = T{ptr.get()}; }
static actor unsafe_cast(const abstract_actor_ptr& ptr) { return {ptr.get()}; }