summaryrefslogtreecommitdiff
path: root/source/3rd-party/Luax/luax_vm.h
blob: e99d5b581cf24d691d7824f87b84c216529b115d (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
#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 LuaxVM
	{
	public:
		LuaxVM(lua_State* L);
		~LuaxVM();

		void Setup();

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

		size_t       objectCount;    // ͳڴstateдʵ

	private:

		void SetupRefTables();

		int	mThreadsCount; // context߳

	};

}

#endif