summaryrefslogtreecommitdiff
path: root/Source/3rdParty/Luax/luax_context.h
blob: 5746cf183d63eb3b5fd033f1babc820d3a9f8837 (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
#ifndef __LUAX_CONTEXT_H__
#define __LUAX_CONTEXT_H__

#include "luax_ref.h"
#include "luax_config.h"
#include "luax_state.h"

namespace Luax
{

	///
	/// lua_stateصcontextһϵдļϣҲûϵҪΪ˽Լڴ档
	///
	class Context
	{
	public:
		Context(lua_State* L);
		~Context();

		void Setup();

		LuaxState    state;          // lua state
		LuaxRefTable strongRefTable; // strong ref table
		LuaxRefTable weakRefTable;   // weak ref table

		size_t objectCount;          // ͳڴstateдʵ

	private:

		void SetupRefTables();

	};

}

#endif