29 lines
1.1 KiB
C++
29 lines
1.1 KiB
C++
#include "act/root.h"
|
|
#include "allocate/factory.h"
|
|
#include "draw/window.h"
|
|
root_controller_t::root_controller_t(root_controller_t::configuration_t* configuration_p) {
|
|
mode_m = configuration_p->mode_m;
|
|
}
|
|
controller_t::status_t root_controller_t::on_event(controller_t::event_t event_p) {
|
|
window_service_t* window_service = new window_service_t();
|
|
window_service_t::status_t window_status = window_service->create_window();
|
|
controller_t::status_t controller_status;
|
|
switch (window_status) {
|
|
case window_service_t::status_t::ok:
|
|
controller_status = controller_t::status_t::ok;
|
|
break;
|
|
case window_service_t::status_t::error:
|
|
default:
|
|
controller_status = controller_t::status_t::error;
|
|
break;
|
|
}
|
|
return controller_status;
|
|
}
|
|
root_controller_t* root_controller_factory_t::create(root_controller_t::configuration_t* configuration_p) {
|
|
return new root_controller_t(configuration_p);
|
|
}
|
|
factory_t<root_controller_t::configuration_t, root_controller_t>::status_t root_controller_factory_t::dispose(root_controller_t* root_controller_p) {
|
|
delete root_controller_p;
|
|
return factory_t<root_controller_t::configuration_t, root_controller_t>::status_t::ok;
|
|
}
|