summaryrefslogtreecommitdiff
path: root/Source/3rdParty/Luax/luax.h
blob: 66162a4df2cc84c7c66fbc2e05b7c9279e8b09af (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
41
42
43
44
45
46
47
48
49
50
51
#ifndef __LUAX_H__
#define __LUAX_H__

// moai-coreг

// include lua.hpp before this
#include "luax_runtime.h"
#include "luax_state.h" 
#include "luax_ref.h"
#include "luax_class.h"
#include "luax_module.h"

// luax չluaҪ
// * modules 
// * class 
// * 
/*

GetClassName 
GetClass 
New 
Extend 
GetInterfaceTable 



__index
__newIndex
__gc
__mode 
__tostring



ݳԱҪʣֵ͵õֵͨʵ֣__indexΪԪ

ƿռͨʵ

ͨupvalueʵֵߵķʣҪͨselfͨBaseClass.Extend("SubClass")BaseClassֲͬbase class
BaseClassΪExtendupvaluecfunctionͨlua_upvalueindexupvalue

֮ͨ.úΪԪԪԸuserdatatableΪԪuserdataԵãʵϲҪ

interface table  ->  member table 
member table  ->  ref table 
ref table  ->  userdata   ˶ÿ͵úühLuaUserdataΪkey)Ϊdebug

class table ͵ı壨NewExtendGetClassName

*/
#endif