Begin dynamic content generators
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#ifndef HANDLER_H
|
||||
#define HANDLER_H
|
||||
#include <memory>
|
||||
#include "../config.h"
|
||||
#include "../response.h"
|
||||
#include "../request.h"
|
||||
@ -9,6 +10,8 @@
|
||||
#include "../database/queryoption.h"
|
||||
#include "../logger.h"
|
||||
#include "../cache/icache.h"
|
||||
#include "../dynamic/dynamiccontent.h"
|
||||
|
||||
class Handler
|
||||
{
|
||||
protected:
|
||||
@ -53,6 +56,12 @@ class Handler
|
||||
virtual ~Handler()
|
||||
{
|
||||
}
|
||||
|
||||
template <class T> inline std::shared_ptr<T> createDynamic()
|
||||
{
|
||||
return std::make_shared<T>(*this->templ, *this->database, *this->urlProvider);
|
||||
}
|
||||
|
||||
Response errorResponse(std::string errortitle, std::string errormessage, int status = 200);
|
||||
std::string createPageTitle(std::string append);
|
||||
};
|
||||
|
Reference in New Issue
Block a user