-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLuaFunctionBinding.h
More file actions
34 lines (23 loc) · 831 Bytes
/
LuaFunctionBinding.h
File metadata and controls
34 lines (23 loc) · 831 Bytes
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
// Copyright 2006-12 HumaNature Studios Inc.
#ifndef __LUAFUNCTIONBINDING_H__
#define __LUAFUNCTIONBINDING_H__
#include "HumaNature/Scripting/LuaUtil.h"
namespace core {
class LuaFunctionBinding
: public MemoryObject
, public LuaUtil
{
public:
// TODO - remove for release?
std::string mName;
virtual ~LuaFunctionBinding();
virtual void call(lua_State* L);
protected:
template<typename ParameterType>
ParameterType interpretLuaParameter(const char* forFunction, lua_State* L, int parameterIndex);
template<typename ReturnType>
int pushReturnValue(lua_State* L, const ReturnType& returnValue);
virtual void interpretLuaParametersAndCall(lua_State* L) = 0;
};
} // namespace core
#endif // __LUAFUNCTIONBINDING_H__