Clean project structure.

This commit is contained in:
jmsgrogan 2023-01-17 10:13:25 +00:00
parent 78a4fa99ff
commit 947bf937fd
496 changed files with 206 additions and 137 deletions

View file

@ -1,30 +0,0 @@
#pragma once
#include "File.h"
#include "TemplateFile.h"
#include <vector>
#include <string>
#include <memory>
#include <unordered_map>
class TemplateSubstitutionContext;
class TemplatingEngine
{
public:
TemplatingEngine(const Path& workingDirectory);
std::string renderTemplate(const std::string& name, TemplateSubstitutionContext* substitutionContext);
private:
TemplateFile* getTemplateFile(const std::string& name);
TemplateFile* getTemplateFile(const Path& path);
void loadTemplateFiles();
void processTemplate(TemplateFile* file, TemplateNode* parent = nullptr);
std::unordered_map<std::string, std::unique_ptr<TemplateFile> > mTemplateFiles;
Path mWorkingDirectory;
std::string mTemplateExtension{ ".html" };
};