Clean project structure.
This commit is contained in:
parent
78a4fa99ff
commit
947bf937fd
496 changed files with 206 additions and 137 deletions
|
@ -1,58 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
class TemplateNode;
|
||||
class TemplateTextBody;
|
||||
|
||||
using Path = std::filesystem::path;
|
||||
|
||||
class TemplateFile
|
||||
{
|
||||
public:
|
||||
TemplateFile(const Path& path);
|
||||
|
||||
~TemplateFile();
|
||||
|
||||
std::string dumpContent();
|
||||
|
||||
std::string getName() const;
|
||||
|
||||
TemplateNode* getContent() const;
|
||||
|
||||
bool hasLoaded() const;
|
||||
|
||||
void loadContent();
|
||||
|
||||
private:
|
||||
std::size_t checkForStatement(const std::string& lineSection);
|
||||
|
||||
std::size_t checkForExpression(const std::string& lineSection);
|
||||
|
||||
void onTextSpanFinished();
|
||||
|
||||
void onFoundStatement(const std::string& statement_string);
|
||||
|
||||
void onFoundExpression(const std::string& expression_string);
|
||||
|
||||
void onFoundBlock(const std::vector<std::string> args);
|
||||
|
||||
void onFoundEndBlock(const std::vector<std::string> args);
|
||||
|
||||
void onFoundExtends(const std::vector<std::string> args);
|
||||
|
||||
void processLine(const std::string& line);
|
||||
|
||||
Path mPath;
|
||||
std::string mParentName;
|
||||
std::vector<std::string> mRawContent;
|
||||
bool mHasLoaded{false};
|
||||
|
||||
std::unique_ptr<TemplateNode> mRootNode;
|
||||
TemplateNode* mWorkingNode{ nullptr };
|
||||
|
||||
std::string mWorkingLineContent;
|
||||
std::unique_ptr<TemplateTextBody> mWorkingTextSpan;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue