Simple Lua
A Simple C++ Lua Wrapper
Loading...
Searching...
No Matches
SL::Lib::Base Struct Reference

Represents a base library package in a Lua script. More...

#include <Lib.hpp>

Public Types

using Map = std::unordered_map<std::string, SL::Function>
 

Public Member Functions

 Base (const Base &)=delete
 
 Base (Base &&)=delete
 
SL_SYMBOL void registerFunctions (SL::Runtime &runtime) const
 Registers the functions in this library with the given runtime.
 
SL_SYMBOL SL::Table asTable () const
 

Static Public Member Functions

template<typename... Args>
static std::tuple< Args... > extractArgs (State L)
 Helper function extracting a list of types arguments from a Lua stack.
 

Protected Member Functions

SL_SYMBOL Base (const std::string &name, const Map &funcs)
 

Protected Attributes

std::string _name
 
Map _funcs
 

Detailed Description

Represents a base library package in a Lua script.

Member Function Documentation

◆ extractArgs()

template<typename... Args>
std::tuple< Args... > SL::Lib::Base::extractArgs ( State L)
static

Helper function extracting a list of types arguments from a Lua stack.

Template Parameters
ArgsTypes of the arguments
Parameters
LLua state
Returns
std::tuple<Args...> Values of the Lua arguments

◆ registerFunctions()

SL_SYMBOL void SL::Lib::Base::registerFunctions ( SL::Runtime & runtime) const

Registers the functions in this library with the given runtime.

Parameters
runtimeLua runtime to register the functions with

The documentation for this struct was generated from the following file: