builtin, testmodules: Constructor and destructor first; then other methods
This commit is contained in:
parent
55541903ab
commit
d8a63c303d
@ -70,6 +70,11 @@ struct Module: public interface::Module, public network::Interface
|
||||
log_v(MODULE, "network construct");
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "network destruct");
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
interface::MutexScope ms(m_interface_mutex);
|
||||
@ -80,11 +85,6 @@ struct Module: public interface::Module, public network::Interface
|
||||
m_server->sub_event(this, Event::t("network:incoming_data"));
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "network destruct");
|
||||
}
|
||||
|
||||
void event(const Event::Type &type, const Event::Private *p)
|
||||
{
|
||||
interface::MutexScope ms(m_interface_mutex);
|
||||
|
@ -19,17 +19,17 @@ struct Module: public interface::Module
|
||||
log_v(MODULE, "__loader construct");
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "__loader destruct");
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
log_v(MODULE, "__loader init");
|
||||
m_server->sub_event(this, Event::t("core:load_modules"));
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "__loader destruct");
|
||||
}
|
||||
|
||||
void event(const Event::Type &type, const Event::Private *p)
|
||||
{
|
||||
if(type == Event::t("core:load_modules")){
|
||||
|
@ -25,6 +25,11 @@ struct Module: public interface::Module
|
||||
log_v(MODULE, "test1 construct");
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "test1 destruct");
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
interface::MutexScope ms(m_interface_mutex);
|
||||
@ -36,11 +41,6 @@ struct Module: public interface::Module
|
||||
m_server->sub_event(this, Event::t("network:packet_received"));
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "test1 destruct");
|
||||
}
|
||||
|
||||
void event(const Event::Type &type, const Event::Private *p)
|
||||
{
|
||||
interface::MutexScope ms(m_interface_mutex);
|
||||
|
@ -23,6 +23,11 @@ struct Module: public interface::Module
|
||||
log_v(MODULE, "test2 construct");
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "test2 destruct");
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
interface::MutexScope ms(m_interface_mutex);
|
||||
@ -31,11 +36,6 @@ struct Module: public interface::Module
|
||||
m_server->sub_event(this, m_EventType_core_start);
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
log_v(MODULE, "test2 destruct");
|
||||
}
|
||||
|
||||
void event(const Event::Type &type, const Event::Private *p)
|
||||
{
|
||||
interface::MutexScope ms(m_interface_mutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user