#include "interface/module.h" #include "interface/server.h" #include "interface/event.h" #include "test1/include/api.h" #include "network/include/api.h" #include using interface::Event; namespace test1 { struct Module: public interface::Module { interface::Server *m_server; Event::Type m_EventType_test1_thing; network::Packet::Type m_NetworkPacketType_dummy_packet = 0; Module(interface::Server *server): m_server(server), m_EventType_test1_thing(Event::t("test1:thing")) { std::cout<<"test1 construct"<sub_event(this, m_EventType_test1_thing); m_server->sub_event(this, Event::t("network:new_client")); m_server->sub_event(this, Event::t("network:get_packet_type_resp")); m_server->emit_event("network:get_packet_type", new network::Req_get_packet_type("test1:dummy_packet")); } ~Module() { std::cout<<"test1 destruct"<