diff --git a/module/Library/Utils/Template.cpp b/module/Library/Utils/Template.cpp new file mode 100644 index 00000000..86ee63a1 --- /dev/null +++ b/module/Library/Utils/Template.cpp @@ -0,0 +1,13 @@ +// ------------------------------------------------------------------------------------------------ +#include "Library/Utils/Template.hpp" + +// ------------------------------------------------------------------------------------------------ +namespace SqMod { + +// ================================================================================================ +void Register_Template(HSQUIRRELVM vm, Table & ns) +{ + +} + +} // Namespace:: SqMod diff --git a/module/Library/Utils/Template.hpp b/module/Library/Utils/Template.hpp new file mode 100644 index 00000000..8191bab2 --- /dev/null +++ b/module/Library/Utils/Template.hpp @@ -0,0 +1,50 @@ +#pragma once + +// ------------------------------------------------------------------------------------------------ +#include "Core/Utility.hpp" + +// ------------------------------------------------------------------------------------------------ +#include + +// ------------------------------------------------------------------------------------------------ +namespace SqMod { + +/* ------------------------------------------------------------------------------------------------ + * +*/ +struct SqTemplateData +{ + /* -------------------------------------------------------------------------------------------- + * JSON data. + */ + nlohmann::json mData{}; + +}; + +/* ------------------------------------------------------------------------------------------------ + * +*/ +struct SqTemplateEnvironment +{ + /* -------------------------------------------------------------------------------------------- + * Environment instance. + */ + inja::Environment mEnv{}; + + +}; + +/* ------------------------------------------------------------------------------------------------ + * Template engine loosely inspired by jinja for python. +*/ +struct SqTemplateInstance +{ + /* -------------------------------------------------------------------------------------------- + * Template instance. + */ + inja::Template mTpl{}; + + +}; + +} // Namespace:: SqMod