Commit 69913604 authored by Dominik Charousset's avatar Dominik Charousset

added virtual getter for actor addressing

parent 79405550
...@@ -66,8 +66,6 @@ class default_protocol : public protocol { ...@@ -66,8 +66,6 @@ class default_protocol : public protocol {
actor_ptr remote_actor(io_stream_ptr_pair ioptrs, variant_args args); actor_ptr remote_actor(io_stream_ptr_pair ioptrs, variant_args args);
inline default_actor_addressing* addressing() { return &m_addressing; }
void register_peer(const process_information& node, default_peer* ptr); void register_peer(const process_information& node, default_peer* ptr);
default_peer_ptr get_peer(const process_information& node); default_peer_ptr get_peer(const process_information& node);
...@@ -80,6 +78,9 @@ class default_protocol : public protocol { ...@@ -80,6 +78,9 @@ class default_protocol : public protocol {
void continue_writer(const default_peer_ptr& pptr); void continue_writer(const default_peer_ptr& pptr);
// covariant return type
default_actor_addressing* addressing();
private: private:
default_actor_addressing m_addressing; default_actor_addressing m_addressing;
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include "cppa/network/acceptor.hpp" #include "cppa/network/acceptor.hpp"
namespace cppa { class actor_addressing; }
namespace cppa { namespace network { namespace cppa { namespace network {
class abstract_middleman; class abstract_middleman;
...@@ -73,6 +75,8 @@ class protocol : public ref_counted { ...@@ -73,6 +75,8 @@ class protocol : public ref_counted {
virtual actor_ptr remote_actor(io_stream_ptr_pair ioptrs, virtual actor_ptr remote_actor(io_stream_ptr_pair ioptrs,
variant_args args ) = 0; variant_args args ) = 0;
virtual actor_addressing* addressing() = 0;
void run_later(std::function<void()> fun); void run_later(std::function<void()> fun);
protected: protected:
......
...@@ -215,4 +215,8 @@ void default_protocol::continue_writer(const default_peer_ptr& pptr) { ...@@ -215,4 +215,8 @@ void default_protocol::continue_writer(const default_peer_ptr& pptr) {
super::continue_writer(pptr.get()); super::continue_writer(pptr.get());
} }
default_actor_addressing* default_protocol::addressing() {
return &m_addressing;
}
} } // namespace cppa::network } } // namespace cppa::network
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