blob: 5c4346bf0af2b4cc6deb9f94a49b95a896d7f71d (
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
|
#pragma once
#include "LuaBindInvoker.h"
namespace LuaBind
{
struct LuaFunction
{
const char* method; // full name
LuaFunction(const char* func=NULL);
void operator = (const char* func);
void AddInt(State& state, int n);
void AddFloat(State& state, float n);
void AddNil(State& state);
void AddBool(State& state, bool b);
void AddString(State& state, const char* str);
void AddTable(State& state, INativeTable& tb);
template<class T>
void AddUserdata(State& state, NativeClass<T>& udata) {
udata.PushUserdata(state);
++argc;
}
void Invoke(State& state, int nReturns);
private:
int argc;
};
}
|