qswiki/handlers/handlerpage.h

22 regels
527 B
C

2018-11-03 17:12:20 +01:00
#ifndef HANDLERPAGE_H
#define HANDLERPAGE_H
#include "handler.h"
class HandlerPage : public Handler
{
protected:
virtual bool canAccess(std::string page) = 0;
virtual bool pageMustExist();
virtual std::string accessErrorMessage();
public:
Response handle(const Request &r) override;
virtual Response handleRequest(PageDao &pageDao, std::string pagename, const Request &r) =0;
~HandlerPage() override { }
using Handler::Handler;
void setPageVars(TemplatePage &page, std::string pagename);
};
#endif // HANDLERPAGE_H