2021-11-14 14:19:13 +01:00
|
|
|
#ifndef BUILDING_CONTROLLER_H
|
|
|
|
#define BUILDING_CONTROLLER_H
|
|
|
|
|
|
|
|
#include "core/string.h"
|
|
|
|
#include "core/containers/vector.h"
|
|
|
|
|
2021-11-14 21:37:04 +01:00
|
|
|
#include "modules/admin_panel/admin_controller.h"
|
2021-11-14 14:19:13 +01:00
|
|
|
|
|
|
|
#include "building.h"
|
|
|
|
|
|
|
|
class Request;
|
|
|
|
class FormValidator;
|
|
|
|
|
2021-11-14 21:37:04 +01:00
|
|
|
class BuildingController : public AdminController {
|
|
|
|
RCPP_OBJECT(BuildingController, AdminController);
|
2021-11-14 14:19:13 +01:00
|
|
|
|
|
|
|
public:
|
2021-11-14 21:37:04 +01:00
|
|
|
void handle_request_default(Request *request);
|
|
|
|
|
|
|
|
void admin_handle_request_main(Request *request);
|
|
|
|
String admin_get_section_name();
|
|
|
|
void admin_add_section_links(Vector<AdminSectionLinkInfo> *links);
|
|
|
|
bool admin_full_render();
|
|
|
|
|
|
|
|
void admin_render_building_list(Request *request);
|
2021-11-16 17:00:58 +01:00
|
|
|
void admin_render_building(Request *request, Ref<Building> building);
|
2021-11-14 21:37:04 +01:00
|
|
|
|
2021-11-14 14:19:13 +01:00
|
|
|
void migrate();
|
|
|
|
virtual void add_default_data();
|
|
|
|
|
|
|
|
static BuildingController *get_singleton();
|
|
|
|
|
|
|
|
BuildingController();
|
|
|
|
~BuildingController();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static BuildingController *_self;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|