supervisor_asio_test.h 721 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. //
  3. // Copyright (c) 2019-2020 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
  4. //
  5. // Distributed under the MIT Software License
  6. //
  7. #include "rotor/asio/supervisor_asio.h"
  8. #include "access.h"
  9. namespace rotor {
  10. namespace test {
  11. struct supervisor_asio_test_t : public rotor::asio::supervisor_asio_t {
  12. using rotor::asio::supervisor_asio_t::supervisor_asio_t;
  13. timers_map_t &get_timers_map() noexcept { return timers_map; }
  14. state_t &get_state() noexcept { return state; }
  15. auto &get_leader_queue() { return access<to::locality_leader>()->access<to::queue>(); }
  16. subscription_t &get_subscription() noexcept { return subscription_map; }
  17. };
  18. } // namespace test
  19. } // namespace rotor