mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +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
|