Pioneer
LuaConstants.h
Go to the documentation of this file.
1 // Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _LUACONSTANTS_H
5 #define _LUACONSTANTS_H
6 
7 struct lua_State;
8 
9 namespace LuaConstants {
10  void Register(lua_State *l);
11 
12  int GetConstantFromArg(lua_State *l, const char *ns, int idx);
13  int GetConstant(lua_State *l, const char *ns, const char *name);
14  bool CheckConstant(lua_State *l, const char *ns, const char *name, int *out);
15  bool CheckConstantFromArg(lua_State *m, const char *ns, int idx, int *out);
16 } // namespace LuaConstants
17 
18 #endif
Definition: LuaConstants.h:9
bool CheckConstantFromArg(lua_State *m, const char *ns, int idx, int *out)
Definition: LuaConstants.cpp:47
int GetConstantFromArg(lua_State *l, const char *ns, int idx)
Definition: LuaConstants.cpp:32
void Register(lua_State *l)
Definition: LuaConstants.cpp:118
int GetConstant(lua_State *l, const char *ns, const char *name)
Definition: LuaConstants.cpp:62
bool CheckConstant(lua_State *l, const char *ns, const char *name, int *out)
Definition: LuaConstants.cpp:70