inkcpp
Loading...
Searching...
No Matches
config.h
1/* Copyright (c) 2024 Julian Benda
2 *
3 * This file is part of inkCPP which is released under MIT license.
4 * See file LICENSE.txt or go to
5 * https://github.com/JBenda/inkcpp for full license details.
6 */
7#pragma once
8
9// The UE build process will define INKCPP_API
10#ifdef INKCPP_API
11# define INK_ENABLE_UNREAL
12# define INKCPP_NO_RTTI
13# define INKCPP_NO_EXCEPTIONS
14#elif defined(INKCPP_BUILD_CLIB)
15# ifndef INKCPP_NO_STD
16# define INK_ENABLE_CSTD
17# endif
18#else
19# ifndef INKCPP_NO_STD
20# define INK_ENABLE_STL
21# define INK_ENABLE_CSTD
22# endif
23#endif
24
25#ifndef INKCPP_NO_RTTI
26# define INK_ENABLE_RTTI
27#endif
28
29#ifndef INKCPP_NO_EXCEPTIONS
30# define INK_ENABLE_EXCEPTIONS
31#endif
32
33// Only turn on if you have json.hpp and you want to use it with the compiler
34// #define INK_EXPOSE_JSON
35
36namespace ink::config
37{
41static constexpr int limitGlobalVariables = -50;
42static constexpr int limitGlobalVariableObservers = -10;
43static constexpr int limitThreadDepth = -10;
44static constexpr int limitEvalStackDepth = -20;
45static constexpr int limitContainerDepth = -20;
50static constexpr int limitEditableLists = -5;
52static constexpr int limitActiveTags = -10;
53// temporary variables and call stack;
54
55static constexpr int limitRuntimeStack = -20;
56// references and call stack
57static constexpr int limitReferenceStack = -20;
58// max number of elements in one output (a string is one element)
59static constexpr int limitOutputSize = -100;
60// maximum number of text fragments between choices
61static constexpr int limitStringTable = -100;
62// max number of choices per choice
63static constexpr int maxChoices = -10;
64// max number of list types, and there total amount of flags
65static constexpr int maxListTypes = -20;
66static constexpr int maxFlags = -200;
67// number of max initialized lists
68static constexpr int maxLists = -50;
69// max number of arguments for external functions (dynamic not possible)
70static constexpr int maxArrayCallArity = 10;
71
72namespace statistics
73{
74 struct container {
75 int capacity;
76 int size;
77 };
78
85
86 struct string_table {
87 container string_refs;
88 };
89
96
107} // namespace statistics
108} // namespace ink::config
Definition config.h:90
list_table lists
based on limitGlobalVariableObservers
Definition config.h:93
container variables_observers
based on limitGlobalVariables
Definition config.h:92
container flags
based on maxListTypes
Definition config.h:82
container list_types
based on limitEditableLists
Definition config.h:81
container lists
based on maxFlags
Definition config.h:83
Definition config.h:97
container evaluation_stack
based on limitThreadDepth
Definition config.h:99
container runtime_ref_stack
based on limitContainerDepth
Definition config.h:103
container active_tags
based on limitContainerDepth
Definition config.h:101
container runtime_stack
based on limitActiveTags
Definition config.h:102
container choices
based on limitOutputSize
Definition config.h:105
container output
based on limitReferenceStack
Definition config.h:104
container container_stack
based on limitEvalStackDepth
Definition config.h:100