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_EH
13# define INKCPP_NO_RTTI
14#elif INKCPP_BUILD_CLIB
15# define INK_ENABLE_CSTD
16#else
17# define INK_ENABLE_STL
18# define INK_ENABLE_CSTD
19#endif
20
21#ifndef INKCPP_NO_EH
22# define INK_ENABLE_EH
23#endif
24
25#ifndef INKCPP_NO_RTTI
26# define INK_ENABLE_RTTI
27#endif
28
29// Only turn on if you have json.hpp and you want to use it with the compiler
30// #define INK_EXPOSE_JSON
31
32namespace ink::config
33{
37static constexpr int limitGlobalVariables = -50;
38static constexpr int limitGlobalVariableObservers = -10;
39static constexpr int limitThreadDepth = -10;
40static constexpr int limitEvalStackDepth = -20;
41static constexpr int limitContainerDepth = -20;
46static constexpr int limitEditableLists = -5;
48static constexpr int limitActiveTags = -10;
49// temporary variables and call stack;
50
51static constexpr int limitRuntimeStack = -20;
52// references and call stack
53static constexpr int limitReferenceStack = -20;
54// max number of elements in one output (a string is one element)
55static constexpr int limitOutputSize = -100;
56// maximum number of text fragments between choices
57static constexpr int limitStringTable = -100;
58// max number of choices per choice
59static constexpr int maxChoices = -10;
60// max number of list types, and there total amount of flags
61static constexpr int maxListTypes = -20;
62static constexpr int maxFlags = -200;
63// number of max initialized lists
64static constexpr int maxLists = -50;
65// max number of arguments for external functions (dynamic not possible)
66static constexpr int maxArrayCallArity = 10;
67
68namespace statistics
69{
70 struct container {
71 int capacity;
72 int size;
73 };
74
81
82 struct string_table {
83 container string_refs;
84 };
85
92
103} // namespace statistics
104} // namespace ink::config
Definition config.h:86
list_table lists
based on limitGlobalVariableObservers
Definition config.h:89
container variables_observers
based on limitGlobalVariables
Definition config.h:88
container flags
based on maxListTypes
Definition config.h:78
container list_types
based on limitEditableLists
Definition config.h:77
container lists
based on maxFlags
Definition config.h:79
Definition config.h:93
container evaluation_stack
based on limitThreadDepth
Definition config.h:95
container runtime_ref_stack
based on limitContainerDepth
Definition config.h:99
container active_tags
based on limitContainerDepth
Definition config.h:97
container runtime_stack
based on limitActiveTags
Definition config.h:98
container choices
based on limitOutputSize
Definition config.h:101
container output
based on limitReferenceStack
Definition config.h:100
container container_stack
based on limitEvalStackDepth
Definition config.h:96