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