Inja 3.4.0
A Template Engine for Modern C++
Loading...
Searching...
No Matches
inja.hpp
1/*
2 ___ _ Version 3.4.0
3 |_ _|_ __ (_) __ _ https://github.com/pantor/inja
4 | || '_ \ | |/ _` | Licensed under the MIT License <http://opensource.org/licenses/MIT>.
5 | || | | || | (_| |
6 |___|_| |_|/ |\__,_| Copyright (c) 2018-2022 Lars Berscheid
7 |__/
8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions:
14The above copyright notice and this permission notice shall be included in all
15copies or substantial portions of the Software.
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22SOFTWARE.
23*/
24
25#ifndef INCLUDE_INJA_INJA_HPP_
26#define INCLUDE_INJA_INJA_HPP_
27
28#include <nlohmann/json.hpp>
29
30namespace inja {
31#ifndef INJA_DATA_TYPE
32using json = nlohmann::json;
33#else
34using json = INJA_DATA_TYPE;
35#endif
36} // namespace inja
37
38#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(INJA_NOEXCEPTION)
39#ifndef INJA_THROW
40#define INJA_THROW(exception) throw exception
41#endif
42#else
43#include <cstdlib>
44#ifndef INJA_THROW
45#define INJA_THROW(exception) \
46 std::abort(); \
47 std::ignore = exception
48#endif
49#ifndef INJA_NOEXCEPTION
50#define INJA_NOEXCEPTION
51#endif
52#endif
53
54#include "environment.hpp"
55#include "exceptions.hpp"
56#include "parser.hpp"
57#include "renderer.hpp"
58#include "template.hpp"
59
60#endif // INCLUDE_INJA_INJA_HPP_