| 123456789101112131415161718192021222324252627282930313233343536373839 |
- {
- "docs": [
- {
- "location": "/",
- "text": "Installation\n\n\nLuwra is a header-only library, which means that nothing has to be compiled in order to use it.\nSimply clone the \nrepository\n or\n\ndownload\n and extract it to a directory of\nyour preference.\n\n\nFor your application to be able to reach the \nlib/luwra.hpp\n header file, you must add\n\n/path/to/luwra/lib\n to the list of include paths. With Clang and GCC that is done using the\n\n-I/path/to/luwra/lib\n command-line parameter.\n\n\nNow you can simply \n#include <luwra.hpp>\n in your C++ files and start using Luwra.\n\n\nReference Manual\n\n\nA reference manual exists \nhere\n.",
- "title": "Home"
- },
- {
- "location": "/#installation",
- "text": "Luwra is a header-only library, which means that nothing has to be compiled in order to use it.\nSimply clone the repository or download and extract it to a directory of\nyour preference. For your application to be able to reach the lib/luwra.hpp header file, you must add /path/to/luwra/lib to the list of include paths. With Clang and GCC that is done using the -I/path/to/luwra/lib command-line parameter. Now you can simply #include <luwra.hpp> in your C++ files and start using Luwra.",
- "title": "Installation"
- },
- {
- "location": "/#reference-manual",
- "text": "A reference manual exists here .",
- "title": "Reference Manual"
- },
- {
- "location": "/usage/",
- "text": "Integration\n\n\nLuwra does not provide a standalone version of Lua nor does it capsule its features. This means that\nall functions and classes operate on\n\nlua_State\n (or the alias\n\nState\n). Doing this allows you to\nintegrate Luwra however you like.\n\n\nStack Interaction\n\n\nAlthough Luwra provides a variety of features, its main concern is efficient and safe interaction\nwith the Lua stack.\n\n\nA fundamental aspect of this is the abstract template \nValue\n.\nEvery type which can be pushed onto or read from the stack has a specialization of it.\nUseful implementations are provides out of the box:\n\n\n\n\n\n\n\n\nC++ type\n\n\nPushable\n\n\nReadable\n\n\nLua type\n\n\n\n\n\n\n\n\n\n\nbool\n\n\nyes\n\n\nyes\n\n\nboolean\n\n\n\n\n\n\nsigned char\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nsigned short\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nsigned int\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nsigned long int\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nsigned long long int\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nunsigned char\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nunsigned short\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nunsigned int\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nunsigned long int\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nunsigned long long int\n\n\nyes\n\n\nyes\n\n\nnumber (integer since 5.3)\n\n\n\n\n\n\nfloat\n\n\nyes\n\n\nyes\n\n\nnumber\n\n\n\n\n\n\ndouble\n\n\nyes\n\n\nyes\n\n\nnumber\n\n\n\n\n\n\nlong double\n\n\nyes\n\n\nyes\n\n\nnumber\n\n\n\n\n\n\nconst char*\n\n\nyes\n\n\nyes\n\n\nstring\n\n\n\n\n\n\nstd::string\n\n\nyes\n\n\nyes\n\n\nstring\n\n\n\n\n\n\nstd::nullptr_t\n\n\nyes\n\n\nyes\n\n\nnil\n\n\n\n\n\n\nstd::tuple<T>\n\n\nyes\n\n\nno\n\n\ndepends on the tuple contents\n\n\n\n\n\n\nlua_CFunction\n\n\nyes\n\n\nno\n\n\nfunction\n\n\n\n\n\n\nNativeFunction<R(A...)>\n\n\nno\n\n\nyes\n\n\nfunction\n\n\n\n\n\n\nFieldVector\n\n\nyes\n\n\nno\n\n\ntable\n\n\n\n\n\n\n\n\nNote:\n Some numeric types have a different size than their matching Lua type - they will be\ntruncated during push or read operations.\n\n\nFrom C++ to Lua\n\n\nWhen pushing values onto the stack you can either use\n\nValue<T>::push\n or the more\nconvenient \npush\n.\nSee these examples:\n\n\n// Push an integer\nluwra::push(lua, 1338);\n\n// Push a number\nluwra::push(lua, 13.37);\n\n// Push a boolean\nluwra::push(lua, false);\n\n// Push a string\nluwra::push(lua, \"Hello World\");",
- "title": "Usage"
- },
- {
- "location": "/usage/#integration",
- "text": "Luwra does not provide a standalone version of Lua nor does it capsule its features. This means that\nall functions and classes operate on lua_State (or the alias State ). Doing this allows you to\nintegrate Luwra however you like.",
- "title": "Integration"
- },
- {
- "location": "/usage/#stack-interaction",
- "text": "Although Luwra provides a variety of features, its main concern is efficient and safe interaction\nwith the Lua stack. A fundamental aspect of this is the abstract template Value .\nEvery type which can be pushed onto or read from the stack has a specialization of it.\nUseful implementations are provides out of the box: C++ type Pushable Readable Lua type bool yes yes boolean signed char yes yes number (integer since 5.3) signed short yes yes number (integer since 5.3) signed int yes yes number (integer since 5.3) signed long int yes yes number (integer since 5.3) signed long long int yes yes number (integer since 5.3) unsigned char yes yes number (integer since 5.3) unsigned short yes yes number (integer since 5.3) unsigned int yes yes number (integer since 5.3) unsigned long int yes yes number (integer since 5.3) unsigned long long int yes yes number (integer since 5.3) float yes yes number double yes yes number long double yes yes number const char* yes yes string std::string yes yes string std::nullptr_t yes yes nil std::tuple<T> yes no depends on the tuple contents lua_CFunction yes no function NativeFunction<R(A...)> no yes function FieldVector yes no table Note: Some numeric types have a different size than their matching Lua type - they will be\ntruncated during push or read operations.",
- "title": "Stack Interaction"
- },
- {
- "location": "/usage/#from-c-to-lua",
- "text": "When pushing values onto the stack you can either use Value<T>::push or the more\nconvenient push .\nSee these examples: // Push an integer\nluwra::push(lua, 1338);\n\n// Push a number\nluwra::push(lua, 13.37);\n\n// Push a boolean\nluwra::push(lua, false);\n\n// Push a string\nluwra::push(lua, \"Hello World\");",
- "title": "From C++ to Lua"
- }
- ]
- }
|