Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added 'override' identifiers

  • Loading branch information...
commit 999a23970f772f4136b339353b99eaa0570c3525 1 parent 4243f6b
@Neverlord Neverlord authored
View
16 cppa/actor_companion_mixin.hpp
@@ -127,41 +127,41 @@ class actor_companion_mixin : public Base {
cleanup(exit_reason::normal);
}
- void enqueue(const actor_ptr& sender, any_tuple msg) {
+ void enqueue(const actor_ptr& sender, any_tuple msg) override {
util::shared_lock_guard<lock_type> guard(m_lock);
if (m_parent) push_message(sender, std::move(msg));
}
void sync_enqueue(const actor_ptr& sender,
message_id id,
- any_tuple msg) {
+ any_tuple msg) override {
util::shared_lock_guard<lock_type> guard(m_lock);
if (m_parent) push_message(sender, std::move(msg), id);
}
- bool initialized() const { return true; }
+ bool initialized() const override { return true; }
- void quit(std::uint32_t) {
+ void quit(std::uint32_t) override {
throw std::runtime_error("Using actor_companion_mixin::quit "
"is prohibited; use Qt's widget "
"management instead.");
}
- void dequeue(behavior&) {
+ void dequeue(behavior&) override {
throw_no_recv();
}
- void dequeue_response(behavior&, message_id) {
+ void dequeue_response(behavior&, message_id) override {
throw_no_recv();
}
- void become_waiting_for(behavior, message_id) {
+ void become_waiting_for(behavior, message_id) override {
throw_no_become();
}
protected:
- void do_become(behavior&&, bool) { throw_no_become(); }
+ void do_become(behavior&&, bool) override { throw_no_become(); }
private:
View
20 cppa/detail/scheduled_actor_dummy.hpp
@@ -37,16 +37,16 @@ namespace cppa { namespace detail {
struct scheduled_actor_dummy : scheduled_actor {
scheduled_actor_dummy();
- void enqueue(const actor_ptr&, any_tuple);
- void sync_enqueue(const actor_ptr&, message_id, any_tuple);
- resume_result resume(util::fiber*, actor_ptr&);
- void quit(std::uint32_t);
- void dequeue(behavior&);
- void dequeue_response(behavior&, message_id);
- void do_become(behavior&&, bool);
- void become_waiting_for(behavior, message_id);
- bool has_behavior();
- scheduled_actor_type impl_type();
+ void enqueue(const actor_ptr&, any_tuple) override;
+ void sync_enqueue(const actor_ptr&, message_id, any_tuple) override;
+ resume_result resume(util::fiber*, actor_ptr&) override;
+ void quit(std::uint32_t) override;
+ void dequeue(behavior&) override;
+ void dequeue_response(behavior&, message_id) override;
+ void do_become(behavior&&, bool) override;
+ void become_waiting_for(behavior, message_id) override;
+ bool has_behavior() override;
+ scheduled_actor_type impl_type() override;
};
} } // namespace cppa::detail
View
18 cppa/network/default_actor_proxy.hpp
@@ -76,23 +76,23 @@ class default_actor_proxy : public actor_proxy {
const process_information_ptr& pinfo,
const default_protocol_ptr& parent);
- void enqueue(const actor_ptr& sender, any_tuple msg);
+ void enqueue(const actor_ptr& sender, any_tuple msg) override;
- void sync_enqueue(const actor_ptr& sender, message_id id, any_tuple msg);
+ void sync_enqueue(const actor_ptr& sender, message_id id, any_tuple msg) override;
- void link_to(const actor_ptr& other);
+ void link_to(const actor_ptr& other) override;
- void unlink_from(const actor_ptr& other);
+ void unlink_from(const actor_ptr& other) override;
- bool remove_backlink(const actor_ptr& to);
+ bool remove_backlink(const actor_ptr& to) override;
- bool establish_backlink(const actor_ptr& to);
+ bool establish_backlink(const actor_ptr& to) override;
- void local_link_to(const actor_ptr& other);
+ void local_link_to(const actor_ptr& other) override;
- void local_unlink_from(const actor_ptr& other);
+ void local_unlink_from(const actor_ptr& other) override;
- void deliver(const network::message_header& hdr, any_tuple msg);
+ void deliver(const network::message_header& hdr, any_tuple msg) override;
inline const process_information_ptr& process_info() const {
return m_pinf;
View
6 cppa/network/default_peer.hpp
@@ -64,11 +64,11 @@ class default_peer : public continuable_io {
const output_stream_ptr& out,
process_information_ptr peer_ptr = nullptr);
- continue_reading_result continue_reading();
+ continue_reading_result continue_reading() override;
- continue_writing_result continue_writing();
+ continue_writing_result continue_writing() override;
- continuable_io* as_io();
+ continuable_io* as_io() override;
void io_failed();
View
4 cppa/opencl/actor_facade.hpp
@@ -117,14 +117,14 @@ class actor_facade<Ret(Args...)> : public actor {
std::move(map_result)};
}
- void sync_enqueue(const actor_ptr& sender, message_id id, any_tuple msg) {
+ void sync_enqueue(const actor_ptr& sender, message_id id, any_tuple msg) override {
CPPA_LOG_TRACE("");
typename util::il_indices<util::type_list<Args...>>::type indices;
enqueue_impl(sender, msg, id, indices);
}
- void enqueue(const actor_ptr& sender, any_tuple msg) {
+ void enqueue(const actor_ptr& sender, any_tuple msg) override {
CPPA_LOG_TRACE("");
typename util::il_indices<util::type_list<Args...>>::type indices;
enqueue_impl(sender, msg, message_id{}, indices);
View
4 cppa/opencl/command.hpp
@@ -60,7 +60,7 @@ class command_dummy : public command {
public:
- void enqueue(command_queue_ptr) { }
+ void enqueue(command_queue_ptr) override { }
};
template<typename T>
@@ -88,7 +88,7 @@ class command_impl : public command {
{
}
- void enqueue (command_queue_ptr queue) {
+ void enqueue (command_queue_ptr queue) override {
CPPA_LOG_TRACE("command::enqueue()");
this->ref();
cl_int err{0};
View
10 cppa/scheduled_actor.hpp
@@ -119,13 +119,13 @@ class scheduled_actor : public extend<local_actor>::with<mailbox_based>{
virtual void run_detached();
- void enqueue(const actor_ptr&, any_tuple);
+ void enqueue(const actor_ptr&, any_tuple) override;
- bool chained_enqueue(const actor_ptr&, any_tuple);
+ bool chained_enqueue(const actor_ptr&, any_tuple) override;
- void sync_enqueue(const actor_ptr&, message_id, any_tuple);
+ void sync_enqueue(const actor_ptr&, message_id, any_tuple) override;
- bool chained_sync_enqueue(const actor_ptr&, message_id, any_tuple);
+ bool chained_sync_enqueue(const actor_ptr&, message_id, any_tuple) override;
void request_timeout(const util::duration& d);
@@ -162,7 +162,7 @@ class scheduled_actor : public extend<local_actor>::with<mailbox_based>{
scheduled_actor(actor_state init_state, bool enable_chained_send);
- void cleanup(std::uint32_t reason);
+ void cleanup(std::uint32_t reason) override;
typedef intrusive::single_reader_queue<mailbox_element,detail::disposer>
mailbox_type;
View
12 cppa/stacked.hpp
@@ -64,11 +64,11 @@ class stacked : public Base {
static constexpr auto receive_flag = detail::rp_nestable;
- virtual void dequeue(behavior& bhvr) {
+ virtual void dequeue(behavior& bhvr) override {
m_recv_policy.receive(util::dptr<Subtype>(this), bhvr);
}
- virtual void dequeue_response(behavior& bhvr, message_id request_id) {
+ virtual void dequeue_response(behavior& bhvr, message_id request_id) override {
m_recv_policy.receive(util::dptr<Subtype>(this), bhvr, request_id);
}
@@ -82,12 +82,12 @@ class stacked : public Base {
m_behavior = std::move(fun);
}
- virtual void quit(std::uint32_t reason) {
+ virtual void quit(std::uint32_t reason) override {
this->cleanup(reason);
throw actor_exited(reason);
}
- virtual void exec_behavior_stack() {
+ virtual void exec_behavior_stack() override {
this->m_bhvr_stack.exec(m_recv_policy, util::dptr<Subtype>(this));
}
@@ -97,11 +97,11 @@ class stacked : public Base {
stacked(std::function<void()> fun, Ts&&... args)
: Base(std::forward<Ts>(args)...), m_behavior(std::move(fun)) { }
- virtual void do_become(behavior&& bhvr, bool discard_old) {
+ void do_become(behavior&& bhvr, bool discard_old) override {
become_impl(std::move(bhvr), discard_old, message_id());
}
- virtual void become_waiting_for(behavior bhvr, message_id mid) {
+ void become_waiting_for(behavior bhvr, message_id mid) override {
become_impl(std::move(bhvr), false, mid);
}
View
6 cppa/threaded.hpp
@@ -108,12 +108,12 @@ class threaded : public Base {
typedef threaded combined_type;
- virtual void enqueue(const actor_ptr& sender, any_tuple msg) {
+ virtual void enqueue(const actor_ptr& sender, any_tuple msg) override {
auto ptr = this->new_mailbox_element(sender, std::move(msg));
push_back(ptr);
}
- virtual void sync_enqueue(const actor_ptr& sender, message_id id, any_tuple msg) {
+ virtual void sync_enqueue(const actor_ptr& sender, message_id id, any_tuple msg) override {
auto ptr = this->new_mailbox_element(sender, std::move(msg), id);
if (!push_back(ptr)) {
detail::sync_request_bouncer f{this->exit_reason()};
@@ -137,8 +137,6 @@ class threaded : public Base {
return try_pop(abs_time);
}
- private:
-
bool timed_wait_for_data(const timeout_type& abs_time) {
CPPA_REQUIRE(not this->m_mailbox.closed());
if (this->m_mailbox.empty()) {
Please sign in to comment.
Something went wrong with that request. Please try again.