supervisor_wx_test.h 836 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. //
  3. // Copyright (c) 2019 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
  4. //
  5. // Distributed under the MIT Software License
  6. //
  7. #include "rotor/wx.hpp"
  8. namespace rotor {
  9. namespace test {
  10. class RotorApp : public wxAppConsole {
  11. public:
  12. virtual ~RotorApp() override {}
  13. };
  14. struct supervisor_wx_test_t : public rotor::wx::supervisor_wx_t {
  15. using rotor::wx::supervisor_wx_t::supervisor_wx_t;
  16. state_t &get_state() noexcept { return state; }
  17. queue_t& get_leader_queue() { return get_leader().queue; }
  18. supervisor_wx_test_t& get_leader() { return *static_cast<supervisor_wx_test_t*>(locality_leader); }
  19. subscription_points_t &get_points() noexcept { return points; }
  20. subscription_map_t &get_subscription() noexcept { return subscription_map; }
  21. };
  22. } // namespace test
  23. } // namespace rotor