mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Add a placeholder template library.
This commit is contained in:
parent
fa79a51c46
commit
aa8953dd8e
13
module/Library/Utils/Template.cpp
Normal file
13
module/Library/Utils/Template.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/Utils/Template.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ================================================================================================
|
||||
void Register_Template(HSQUIRRELVM vm, Table & ns)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
} // Namespace:: SqMod
|
50
module/Library/Utils/Template.hpp
Normal file
50
module/Library/Utils/Template.hpp
Normal file
@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Core/Utility.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <inja/inja.hpp>
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
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
|
Loading…
Reference in New Issue
Block a user