mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-19 03:57:14 +01:00
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
|
#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
|