mourne_rcpp_fw/app/buildings/building_node.h

48 lines
1.1 KiB
C
Raw Normal View History

#ifndef BUILDING_NODE_H
#define BUILDING_NODE_H
2021-11-14 14:19:13 +01:00
#include "core/string.h"
#include "core/containers/vector.h"
2022-02-05 23:02:06 +01:00
#include "web_modules/admin_panel/admin_node.h"
2021-11-14 14:19:13 +01:00
#include "building.h"
class Request;
class FormValidator;
class QueryResult;
2021-11-14 14:19:13 +01:00
class BuildingNode : public AdminNode {
RCPP_OBJECT(BuildingNode, AdminNode);
2021-11-14 14:19:13 +01:00
public:
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);
void admin_render_building(Request *request, Ref<Building> building);
virtual Ref<Building> db_get_building(const int id);
virtual Vector<Ref<Building> > db_get_all();
virtual void db_save_building(Ref<Building> &building);
virtual void db_parse_row(Ref<QueryResult> &result, Ref<Building> &building);
2022-02-05 23:02:06 +01:00
void create_table();
void drop_table();
void create_default_entries();
2021-11-14 14:19:13 +01:00
static BuildingNode *get_singleton();
2021-11-14 14:19:13 +01:00
BuildingNode();
~BuildingNode();
2021-11-14 14:19:13 +01:00
protected:
static BuildingNode *_self;
2021-11-14 14:19:13 +01:00
};
#endif