blob: 3882cd615059b1d317412c30ad47e12543f805ad (
plain)
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
|
local listMgr = require 'vm.list'
---@class EmmyTableType
local mt = {}
mt.__index = mt
mt.type = 'emmy.tableType'
function mt:getType()
return 'table'
end
function mt:getKeyType()
return self.keyType
end
function mt:getValueType()
return self.valueType
end
function mt:getSource()
return listMgr.get(self.source)
end
function mt:setValue(value)
self.value = value
end
function mt:getValue()
return self.value
end
return function (manager, source, keyType, valueType)
local self = setmetatable({
source = source.id,
keyType = keyType,
valueType = valueType,
_manager = manager,
}, mt)
return self
end
|