mourne_rcpp_fw/app/assignments/assignment_node.h

48 lines
1.1 KiB
C
Raw Normal View History

#ifndef ASSIGNMENT_CONTROLLER_H
#define ASSIGNMENT_CONTROLLER_H
#include "core/containers/vector.h"
2022-02-17 23:09:06 +01:00
#include "core/string.h"
2022-02-05 23:02:06 +01:00
#include "web_modules/admin_panel/admin_node.h"
#include "assignment.h"
class Request;
class FormValidator;
2022-02-17 23:09:06 +01:00
class QueryResult;
class AssignmentNode : public AdminNode {
RCPP_OBJECT(AssignmentNode, AdminNode);
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_assignment_list(Request *request);
void admin_render_assignment(Request *request, Ref<Assignment> assignment);
2022-02-17 23:09:06 +01:00
virtual Ref<Assignment> db_get_assignment(const int id);
virtual Vector<Ref<Assignment> > db_get_all();
virtual void db_save_assignment(Ref<Assignment> &assignment);
virtual void db_parse_row(Ref<QueryResult> &result, Ref<Assignment> &assignment);
2022-02-05 23:02:06 +01:00
void create_table();
void drop_table();
void create_default_entries();
2022-02-17 23:09:06 +01:00
static AssignmentNode *get_singleton();
2022-02-17 23:09:06 +01:00
AssignmentNode();
~AssignmentNode();
protected:
2022-02-17 23:09:06 +01:00
static AssignmentNode *_self;
};
#endif