mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-05-26 19:41:43 +00:00
add basis for code rendering
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "RenderingContext.h"
|
||||
|
||||
class CodeTemplateFile
|
||||
{
|
||||
public:
|
||||
std::string m_file_name;
|
||||
int m_tag;
|
||||
|
||||
CodeTemplateFile(std::string fileName, const int tag)
|
||||
: m_file_name(std::move(fileName)),
|
||||
m_tag(tag)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class ICodeTemplate
|
||||
{
|
||||
public:
|
||||
ICodeTemplate() = default;
|
||||
virtual ~ICodeTemplate() = default;
|
||||
ICodeTemplate(const ICodeTemplate& other) = default;
|
||||
ICodeTemplate(ICodeTemplate&& other) noexcept = default;
|
||||
ICodeTemplate& operator=(const ICodeTemplate& other) = default;
|
||||
ICodeTemplate& operator=(ICodeTemplate&& other) noexcept = default;
|
||||
|
||||
virtual std::vector<CodeTemplateFile> GetFilesToRender(RenderingContext* context) = 0;
|
||||
virtual void RenderFile(std::ostream& stream, int fileTag) = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user