lua::LazyFunction Struct Reference
Lazy function in lua (delayed function evaluation) More...
#include <utils.h>
Detailed Description
Lazy function in lua (delayed function evaluation)
It's just a small wrapper around a lua anonymous function.
Inheritance diagram for lua::LazyFunction:
Public Member Functions | |
virtual momemta::any | operator() () const override |
Evaluate the anonymous function. More... | |
LazyFunction (lua_State *L, int index) | |
Bind a anonymous lua function. More... | |
Public Member Functions inherited from lua::Lazy | |
Lazy (lua_State *L) | |
Public Attributes | |
int | ref_index |
The reference index where the anonymous function is stored. | |
Public Attributes inherited from lua::Lazy | |
lua_State * | L |
The global lua state. This state must be valid for as long as this instance. | |
Constructor & Destructor Documentation
◆ LazyFunction()
lua::LazyFunction::LazyFunction | ( | lua_State * | L, |
int | index | ||
) |
Bind a anonymous lua function.
- Parameters
-
L The current lua state. index The index of the anonymous function on the stack
Definition at line 45 of file utils.cc.
Referenced by lua::to_any().
Member Function Documentation
◆ operator()()
|
overridevirtual |
The documentation for this struct was generated from the following files: