-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathPlatform.lua
97 lines (84 loc) · 3.55 KB
/
Platform.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
PLOOP_PLATFORM_SETTINGS = {
--- Whether the type validation should be disabled. The value should be
-- false during development, toggling it to true will make the system
-- ignore the value valiation in several conditions for speed.
TYPE_VALIDATION_DISABLED = false,
--- Whether the attribute system use warning instead of error for
-- invalid attribute target type.
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
ATTR_USE_WARN_INSTEAD_ERROR = false,
--- Whether the environmet allow global variable be nil, if false,
-- things like ture(spell error) could trigger error.
-- Default true
-- @owner PLOOP_PLATFORM_SETTINGS
ENV_ALLOW_GLOBAL_VAR_BE_NIL = true,
--- Whether allow old style of type definitions like :
-- class "A"
-- -- xxx
-- endclass "A"
--
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
TYPE_DEFINITION_WITH_OLD_STYLE = true,
--- Whether all old objects keep using new features when their
-- classes or extend interfaces are re-defined.
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
CLASS_NO_MULTI_VERSION_CLASS = true,
--- Whether all interfaces & classes only use the classic format
-- `super.Method(obj, ...)` to call super's features, don't use new
-- style like :
-- super[obj].Name = "Ann"
-- super[obj].OnNameChanged = super[obj].OnNameChanged + print
-- super[obj]:Greet("King")
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
CLASS_NO_SUPER_OBJECT_STYLE = true,
--- Whether all interfaces has anonymous class, so it can be used
-- to generate object
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
INTERFACE_ALL_ANONYMOUS_CLASS = false,
--- Whether all class objects can't save value to fields directly,
-- So only init fields, properties, events can be set during runtime.
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
OBJECT_NO_RAWSEST = false,
--- Whether all class objects can't fetch nil value from it, combine it
-- with @OBJ_NO_RAWSEST will force a strict mode for development.
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
OBJECT_NO_NIL_ACCESS = false,
--- Whether save the creation places (source and line) for all objects
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
OBJECT_DEBUG_SOURCE = false,
--- The Log level used in the Prototype core part.
-- 1 : Trace
-- 2 : Debug
-- 3 : Info
-- 4 : Warn
-- 5 : Error
-- 6 : Fatal
-- Default 3(Info)
-- @owner PLOOP_PLATFORM_SETTINGS
CORE_LOG_LEVEL = 3,
--- The core log handler works like :
-- function CORE_LOG_HANDLER(message, loglevel)
-- -- message : the log message
-- -- loglevel : the log message's level
-- end
-- Default print
-- @owner PLOOP_PLATFORM_SETTINGS
CORE_LOG_HANDLER = print,
--- Whether try to save the stack data into the exception object, so
-- we can have more details about the exception.
-- Default false
-- @owner PLOOP_PLATFORM_SETTINGS
EXCEPTION_SAVE_STACK_DATA = false,
--- The max pool size of the thread pool
-- Default 40
-- @owner PLOOP_PLATFORM_SETTINGS
THREAD_POOL_MAX_SIZE = 40,
}