-
Book Overview & Buying
-
Table Of Contents
Integrate Lua with C++
By :
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, folder names, filenames, file extensions, pathnames, user input and program output.
Here is an example: “Then you create a union type with std::variant, saying that this union type may be and can only be from the pre-defined Lua mappings.”
A block of code is set as follows:
void LuaExecutor::setRegistry(const LuaValue &key,
const LuaValue &value)
{
pushValue(key);
pushValue(value);
lua_settable(L, LUA_REGISTRYINDEX);
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
int luaNew(lua_State *L)
{
....
if (type == LUA_TNIL)
{
...
lua_pushcfunction(L, luaDelete);
lua_setfield(L, -2, "__gc");
}
...
}
Bold: Indicates a new term, an important concept, or crucial software. Here is an example: “All systems with graphic user interfaces will also provide an application in which to start a shell. Often, those applications are called a terminal or a console.”
Tips or important notes
Appear like this.