qswiki/templatepage.h

23 lines
423 B
C
Raw Permalink Normal View History

2018-11-03 17:12:20 +01:00
#ifndef TEMPLATEPAGE_H
#define TEMPLATEPAGE_H
#include <string>
#include <string_view>
#include <map>
#include <memory>
2018-11-03 17:12:20 +01:00
class TemplatePage
{
private:
std::shared_ptr<const std::string> content;
2018-11-03 17:12:20 +01:00
std::map<std::string, std::string> varsMap;
public:
TemplatePage();
TemplatePage(std::string content);
std::string render() const;
void setVar(const std::string &key, std::string value);
};
#endif // TEMPLATEPAGE_H