Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
sol::state_view Class Reference

#include <sol.hpp>

Inheritance diagram for sol::state_view:
Inheritance graph
[legend]

Public Types

using const_iterator = typename global_table::const_iterator
 
using iterator = typename global_table::iterator
 

Public Member Functions

template<typename Fx >
void add_package_loader (Fx &&fx, bool clear_all_package_loaders=false)
 
iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
gc_mode change_gc_mode_generational (int minor_multiplier, int major_multiplier)
 
gc_mode change_gc_mode_incremental (int pause, int step_multiplier, int step_byte_size)
 
void clear_package_loaders ()
 
void collect_garbage ()
 
void collect_gc ()
 
template<typename Name , typename... Args>
table create_named_table (Name &&name, Args &&... args)
 
template<typename Key , typename Value , typename... Args>
table create_table (int narr, int nrec, Key &&key, Value &&value, Args &&... args)
 
table create_table (int narr=0, int nrec=0)
 
template<typename Name , typename Key , typename Value , typename... Args>
table create_table (Name &&name, int narr, int nrec, Key &&key, Value &&value, Args &&... args)
 
template<typename Name >
table create_table (Name &&name, int narr=0, int nrec=0)
 
template<typename... Args>
table create_table_with (Args &&... args)
 
template<typename E >
protected_function_result do_file (const std::string &filename, const basic_environment< E > &env, load_mode mode=load_mode::any)
 
protected_function_result do_file (const std::string &filename, load_mode mode=load_mode::any)
 
template<typename E >
protected_function_result do_reader (lua_Reader reader, void *data, const basic_environment< E > &env, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
protected_function_result do_reader (lua_Reader reader, void *data, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename E >
protected_function_result do_string (const string_view &code, const basic_environment< E > &env, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
protected_function_result do_string (const string_view &code, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
iterator end () const
 
template<typename Fx >
void for_each (Fx &&fx)
 
template<typename... Args, typename... Keys>
decltype(auto) get (Keys &&... keys) const
 
template<typename T , typename Key , typename D >
decltype(auto) get_or (Key &&key, D &&otherwise) const
 
template<typename T , typename Key >
decltype(auto) get_or (Key &&key, T &&otherwise) const
 
global_tableglobals ()
 
global_table globals () const
 
bool is_gc_on () const
 
load_result load (const string_view &code, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
load_result load (lua_Reader reader, void *data, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
load_result load_buffer (const char *buff, size_t size, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
load_result load_buffer (const std::byte *buff, size_t size, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
load_result load_file (const std::string &filename, load_mode mode=load_mode::any)
 
lua_Statelua_state () const
 
std::size_t memory_used () const
 
template<bool read_only = true, typename... Args>
state_viewnew_enum (const string_view &name, Args &&... args)
 
template<typename T , bool read_only = true>
state_viewnew_enum (const string_view &name, std::initializer_list< std::pair< string_view, T >> items)
 
template<typename Class , typename... Args>
usertype< Class > new_usertype (Args &&... args)
 
template<typename... Args>
void open_libraries (Args &&... args)
 
 operator lua_State * () const
 
template<typename T >
table_proxy< global_table &, detail::proxy_key_t< T > > operator[] (T &&key)
 
template<typename T >
table_proxy< const global_table &, detail::proxy_key_t< T > > operator[] (T &&key) const
 
table registry () const
 
object require (const std::string &key, lua_CFunction open_function, bool create_global=true)
 
object require_file (const std::string &key, const std::string &filename, bool create_global=true, load_mode mode=load_mode::any)
 
object require_script (const std::string &key, const string_view &code, bool create_global=true, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
void restart_gc ()
 
template<typename E >
protected_function_result safe_script (const string_view &code, const basic_environment< E > &env, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename Fx , typename E >
protected_function_result safe_script (const string_view &code, const basic_environment< E > &env, Fx &&on_error, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
protected_function_result safe_script (const string_view &code, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result safe_script (const string_view &code, Fx &&on_error, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
protected_function_result safe_script (lua_Reader reader, void *data, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result safe_script (lua_Reader reader, void *data, Fx &&on_error, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename Fx , typename E >
protected_function_result safe_script_file (const std::string &filename, const basic_environment< E > &env, Fx &&on_error, load_mode mode=load_mode::any)
 
template<typename E >
protected_function_result safe_script_file (const std::string &filename, const basic_environment< E > &env, load_mode mode=load_mode::any)
 
template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result safe_script_file (const std::string &filename, Fx &&on_error, load_mode mode=load_mode::any)
 
protected_function_result safe_script_file (const std::string &filename, load_mode mode=load_mode::any)
 
template<typename Fx , typename E >
protected_function_result script (const string_view &code, const basic_environment< E > &env, Fx &&on_error, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
protected_function_result script (const string_view &code, const environment &env, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
unsafe_function_result script (const string_view &code, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result script (const string_view &code, Fx &&on_error, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename Fx , typename E >
protected_function_result script_file (const std::string &filename, const basic_environment< E > &env, Fx &&on_error, load_mode mode=load_mode::any)
 
protected_function_result script_file (const std::string &filename, const environment &env, load_mode mode=load_mode::any)
 
template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result script_file (const std::string &filename, Fx &&on_error, load_mode mode=load_mode::any)
 
unsafe_function_result script_file (const std::string &filename, load_mode mode=load_mode::any)
 
template<typename... Args>
state_viewset (Args &&... args)
 
void set_exception_handler (exception_handler_function handler)
 
template<typename Sig , typename... Args, typename Key >
state_viewset_function (Key &&key, Args &&... args)
 
template<typename... Args, typename Key >
state_viewset_function (Key &&key, Args &&... args)
 
void set_panic (lua_CFunction panic)
 
int stack_clear ()
 
int stack_top () const
 
 state_view (lua_State *Ls)
 
 state_view (this_state Ls)
 
bool step_gc (int step_size_kilobytes)
 
void stop_gc ()
 
bool supports_gc_mode (gc_mode mode) const noexcept
 
template<typename T , typename... Keys>
decltype(auto) traverse_get (Keys &&... keys) const
 
template<typename... Args>
state_viewtraverse_set (Args &&... args)
 
template<typename E >
unsafe_function_result unsafe_script (const string_view &code, const basic_environment< E > &env, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
unsafe_function_result unsafe_script (const string_view &code, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename E >
unsafe_function_result unsafe_script (lua_Reader reader, void *data, const basic_environment< E > &env, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
unsafe_function_result unsafe_script (lua_Reader reader, void *data, const std::string &chunkname=detail::default_chunk_name(), load_mode mode=load_mode::any)
 
template<typename E >
unsafe_function_result unsafe_script_file (const std::string &filename, const basic_environment< E > &env, load_mode mode=load_mode::any)
 
unsafe_function_result unsafe_script_file (const std::string &filename, load_mode mode=load_mode::any)
 

Static Public Member Functions

template<typename Key , typename Value , typename... Args>
static table create_table (lua_State *L, int narr, int nrec, Key &&key, Value &&value, Args &&... args)
 
static table create_table (lua_State *L, int narr=0, int nrec=0)
 
template<typename... Args>
static table create_table_with (lua_State *L, Args &&... args)
 

Private Member Functions

template<typename T >
void ensure_package (const std::string &key, T &&sr)
 
optional< objectis_loaded_package (const std::string &key)
 
template<typename Fx >
object require_core (const std::string &key, Fx &&action, bool create_global=true)
 

Private Attributes

global_table global
 
lua_StateL
 
table reg
 

Detailed Description

Definition at line 27237 of file sol.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 27307 of file sol.hpp.

◆ iterator

Definition at line 27306 of file sol.hpp.

Constructor & Destructor Documentation

◆ state_view() [1/2]

sol::state_view::state_view ( lua_State Ls)
inline

Definition at line 27309 of file sol.hpp.

◆ state_view() [2/2]

sol::state_view::state_view ( this_state  Ls)
inline

Definition at line 27312 of file sol.hpp.

Member Function Documentation

◆ add_package_loader()

template<typename Fx >
void sol::state_view::add_package_loader ( Fx &&  fx,
bool  clear_all_package_loaders = false 
)
inline

Definition at line 27454 of file sol.hpp.

◆ begin()

iterator sol::state_view::begin ( ) const
inline

Definition at line 27804 of file sol.hpp.

◆ cbegin()

const_iterator sol::state_view::cbegin ( ) const
inline

Definition at line 27812 of file sol.hpp.

◆ cend()

const_iterator sol::state_view::cend ( ) const
inline

Definition at line 27816 of file sol.hpp.

◆ change_gc_mode_generational()

gc_mode sol::state_view::change_gc_mode_generational ( int  minor_multiplier,
int  major_multiplier 
)
inline

Definition at line 27920 of file sol.hpp.

◆ change_gc_mode_incremental()

gc_mode sol::state_view::change_gc_mode_incremental ( int  pause,
int  step_multiplier,
int  step_byte_size 
)
inline

Definition at line 27896 of file sol.hpp.

◆ clear_package_loaders()

void sol::state_view::clear_package_loaders ( )
inline

Definition at line 27426 of file sol.hpp.

◆ collect_garbage()

void sol::state_view::collect_garbage ( )
inline

Definition at line 27866 of file sol.hpp.

◆ collect_gc()

void sol::state_view::collect_gc ( )
inline

Definition at line 27870 of file sol.hpp.

◆ create_named_table()

template<typename Name , typename... Args>
table sol::state_view::create_named_table ( Name &&  name,
Args &&...  args 
)
inline

Definition at line 28037 of file sol.hpp.

◆ create_table() [1/6]

template<typename Key , typename Value , typename... Args>
table sol::state_view::create_table ( int  narr,
int  nrec,
Key &&  key,
Value &&  value,
Args &&...  args 
)
inline

Definition at line 28048 of file sol.hpp.

◆ create_table() [2/6]

table sol::state_view::create_table ( int  narr = 0,
int  nrec = 0 
)
inline

Definition at line 28043 of file sol.hpp.

◆ create_table() [3/6]

template<typename Key , typename Value , typename... Args>
static table sol::state_view::create_table ( lua_State L,
int  narr,
int  nrec,
Key &&  key,
Value &&  value,
Args &&...  args 
)
inlinestatic

Definition at line 28062 of file sol.hpp.

◆ create_table() [4/6]

static table sol::state_view::create_table ( lua_State L,
int  narr = 0,
int  nrec = 0 
)
inlinestatic

Definition at line 28057 of file sol.hpp.

◆ create_table() [5/6]

template<typename Name , typename Key , typename Value , typename... Args>
table sol::state_view::create_table ( Name &&  name,
int  narr,
int  nrec,
Key &&  key,
Value &&  value,
Args &&...  args 
)
inline

Definition at line 28032 of file sol.hpp.

◆ create_table() [6/6]

template<typename Name >
table sol::state_view::create_table ( Name &&  name,
int  narr = 0,
int  nrec = 0 
)
inline

Definition at line 28027 of file sol.hpp.

◆ create_table_with() [1/2]

template<typename... Args>
table sol::state_view::create_table_with ( Args &&...  args)
inline

Definition at line 28053 of file sol.hpp.

◆ create_table_with() [2/2]

template<typename... Args>
static table sol::state_view::create_table_with ( lua_State L,
Args &&...  args 
)
inlinestatic

Definition at line 28067 of file sol.hpp.

◆ do_file() [1/2]

template<typename E >
protected_function_result sol::state_view::do_file ( const std::string &  filename,
const basic_environment< E > &  env,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27542 of file sol.hpp.

◆ do_file() [2/2]

protected_function_result sol::state_view::do_file ( const std::string &  filename,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27552 of file sol.hpp.

◆ do_reader() [1/2]

template<typename E >
protected_function_result sol::state_view::do_reader ( lua_Reader  reader,
void *  data,
const basic_environment< E > &  env,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27490 of file sol.hpp.

◆ do_reader() [2/2]

protected_function_result sol::state_view::do_reader ( lua_Reader  reader,
void *  data,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27503 of file sol.hpp.

◆ do_string() [1/2]

template<typename E >
protected_function_result sol::state_view::do_string ( const string_view code,
const basic_environment< E > &  env,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27516 of file sol.hpp.

◆ do_string() [2/2]

protected_function_result sol::state_view::do_string ( const string_view code,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27529 of file sol.hpp.

◆ end()

iterator sol::state_view::end ( ) const
inline

Definition at line 27808 of file sol.hpp.

◆ ensure_package()

template<typename T >
void sol::state_view::ensure_package ( const std::string &  key,
T &&  sr 
)
inlineprivate

Definition at line 27258 of file sol.hpp.

◆ for_each()

template<typename Fx >
void sol::state_view::for_each ( Fx &&  fx)
inline

Definition at line 28000 of file sol.hpp.

◆ get()

template<typename... Args, typename... Keys>
decltype(auto) sol::state_view::get ( Keys &&...  keys) const
inline

Definition at line 27951 of file sol.hpp.

◆ get_or() [1/2]

template<typename T , typename Key , typename D >
decltype(auto) sol::state_view::get_or ( Key &&  key,
D &&  otherwise 
) const
inline

Definition at line 27961 of file sol.hpp.

◆ get_or() [2/2]

template<typename T , typename Key >
decltype(auto) sol::state_view::get_or ( Key &&  key,
T &&  otherwise 
) const
inline

Definition at line 27956 of file sol.hpp.

◆ globals() [1/2]

global_table& sol::state_view::globals ( )
inline

Definition at line 27826 of file sol.hpp.

◆ globals() [2/2]

global_table sol::state_view::globals ( ) const
inline

Definition at line 27820 of file sol.hpp.

◆ is_gc_on()

bool sol::state_view::is_gc_on ( ) const
inline

Definition at line 27857 of file sol.hpp.

◆ is_loaded_package()

optional<object> sol::state_view::is_loaded_package ( const std::string &  key)
inlineprivate

Definition at line 27243 of file sol.hpp.

◆ load() [1/2]

load_result sol::state_view::load ( const string_view code,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27776 of file sol.hpp.

◆ load() [2/2]

load_result sol::state_view::load ( lua_Reader  reader,
void *  data,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27797 of file sol.hpp.

◆ load_buffer() [1/2]

load_result sol::state_view::load_buffer ( const char *  buff,
size_t  size,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27783 of file sol.hpp.

◆ load_buffer() [2/2]

load_result sol::state_view::load_buffer ( const std::byte *  buff,
size_t  size,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27787 of file sol.hpp.

◆ load_file()

load_result sol::state_view::load_file ( const std::string &  filename,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27792 of file sol.hpp.

◆ lua_state()

lua_State* sol::state_view::lua_state ( ) const
inline

Definition at line 27315 of file sol.hpp.

◆ memory_used()

std::size_t sol::state_view::memory_used ( ) const
inline

Definition at line 27834 of file sol.hpp.

◆ new_enum() [1/2]

template<bool read_only = true, typename... Args>
state_view& sol::state_view::new_enum ( const string_view name,
Args &&...  args 
)
inline

Definition at line 27988 of file sol.hpp.

◆ new_enum() [2/2]

template<typename T , bool read_only = true>
state_view& sol::state_view::new_enum ( const string_view name,
std::initializer_list< std::pair< string_view, T >>  items 
)
inline

Definition at line 27994 of file sol.hpp.

◆ new_usertype()

template<typename Class , typename... Args>
usertype<Class> sol::state_view::new_usertype ( Args &&...  args)
inline

Definition at line 27983 of file sol.hpp.

◆ open_libraries()

template<typename... Args>
void sol::state_view::open_libraries ( Args &&...  args)
inline

Definition at line 27320 of file sol.hpp.

◆ operator lua_State *()

sol::state_view::operator lua_State * ( ) const
inline

Definition at line 27938 of file sol.hpp.

◆ operator[]() [1/2]

template<typename T >
table_proxy<global_table&, detail::proxy_key_t<T> > sol::state_view::operator[] ( T &&  key)
inline

Definition at line 28005 of file sol.hpp.

◆ operator[]() [2/2]

template<typename T >
table_proxy<const global_table&, detail::proxy_key_t<T> > sol::state_view::operator[] ( T &&  key) const
inline

Definition at line 28010 of file sol.hpp.

◆ registry()

table sol::state_view::registry ( ) const
inline

Definition at line 27830 of file sol.hpp.

◆ require()

object sol::state_view::require ( const std::string &  key,
lua_CFunction  open_function,
bool  create_global = true 
)
inline

Definition at line 27410 of file sol.hpp.

◆ require_core()

template<typename Fx >
object sol::state_view::require_core ( const std::string &  key,
Fx &&  action,
bool  create_global = true 
)
inlineprivate

Definition at line 27284 of file sol.hpp.

◆ require_file()

object sol::state_view::require_file ( const std::string &  key,
const std::string &  filename,
bool  create_global = true,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27421 of file sol.hpp.

◆ require_script()

object sol::state_view::require_script ( const std::string &  key,
const string_view code,
bool  create_global = true,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27415 of file sol.hpp.

◆ restart_gc()

void sol::state_view::restart_gc ( )
inline

Definition at line 27887 of file sol.hpp.

◆ safe_script() [1/6]

template<typename E >
protected_function_result sol::state_view::safe_script ( const string_view code,
const basic_environment< E > &  env,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27601 of file sol.hpp.

◆ safe_script() [2/6]

template<typename Fx , typename E >
protected_function_result sol::state_view::safe_script ( const string_view code,
const basic_environment< E > &  env,
Fx &&  on_error,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27591 of file sol.hpp.

◆ safe_script() [3/6]

protected_function_result sol::state_view::safe_script ( const string_view code,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27606 of file sol.hpp.

◆ safe_script() [4/6]

template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result sol::state_view::safe_script ( const string_view code,
Fx &&  on_error,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27581 of file sol.hpp.

◆ safe_script() [5/6]

protected_function_result sol::state_view::safe_script ( lua_Reader  reader,
void *  data,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27573 of file sol.hpp.

◆ safe_script() [6/6]

template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result sol::state_view::safe_script ( lua_Reader  reader,
void *  data,
Fx &&  on_error,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27564 of file sol.hpp.

◆ safe_script_file() [1/4]

template<typename Fx , typename E >
protected_function_result sol::state_view::safe_script_file ( const std::string &  filename,
const basic_environment< E > &  env,
Fx &&  on_error,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27623 of file sol.hpp.

◆ safe_script_file() [2/4]

template<typename E >
protected_function_result sol::state_view::safe_script_file ( const std::string &  filename,
const basic_environment< E > &  env,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27633 of file sol.hpp.

◆ safe_script_file() [3/4]

template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result sol::state_view::safe_script_file ( const std::string &  filename,
Fx &&  on_error,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27614 of file sol.hpp.

◆ safe_script_file() [4/4]

protected_function_result sol::state_view::safe_script_file ( const std::string &  filename,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27637 of file sol.hpp.

◆ script() [1/4]

template<typename Fx , typename E >
protected_function_result sol::state_view::script ( const string_view code,
const basic_environment< E > &  env,
Fx &&  on_error,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27734 of file sol.hpp.

◆ script() [2/4]

protected_function_result sol::state_view::script ( const string_view code,
const environment env,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27744 of file sol.hpp.

◆ script() [3/4]

unsafe_function_result sol::state_view::script ( const string_view code,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27768 of file sol.hpp.

◆ script() [4/4]

template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result sol::state_view::script ( const string_view code,
Fx &&  on_error,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27721 of file sol.hpp.

◆ script_file() [1/4]

template<typename Fx , typename E >
protected_function_result sol::state_view::script_file ( const std::string &  filename,
const basic_environment< E > &  env,
Fx &&  on_error,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27740 of file sol.hpp.

◆ script_file() [2/4]

protected_function_result sol::state_view::script_file ( const std::string &  filename,
const environment env,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27749 of file sol.hpp.

◆ script_file() [3/4]

template<typename Fx , meta::disable_any< meta::is_string_constructible< meta::unqualified_t< Fx >>, meta::is_specialization_of< meta::unqualified_t< Fx >, basic_environment >> = meta::enabler>
protected_function_result sol::state_view::script_file ( const std::string &  filename,
Fx &&  on_error,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27729 of file sol.hpp.

◆ script_file() [4/4]

unsafe_function_result sol::state_view::script_file ( const std::string &  filename,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27772 of file sol.hpp.

◆ set()

template<typename... Args>
state_view& sol::state_view::set ( Args &&...  args)
inline

Definition at line 27966 of file sol.hpp.

◆ set_exception_handler()

void sol::state_view::set_exception_handler ( exception_handler_function  handler)
inline

Definition at line 27946 of file sol.hpp.

◆ set_function() [1/2]

template<typename Sig , typename... Args, typename Key >
state_view& sol::state_view::set_function ( Key &&  key,
Args &&...  args 
)
inline

Definition at line 28015 of file sol.hpp.

◆ set_function() [2/2]

template<typename... Args, typename Key >
state_view& sol::state_view::set_function ( Key &&  key,
Args &&...  args 
)
inline

Definition at line 28021 of file sol.hpp.

◆ set_panic()

void sol::state_view::set_panic ( lua_CFunction  panic)
inline

Definition at line 27942 of file sol.hpp.

◆ stack_clear()

int sol::state_view::stack_clear ( )
inline

Definition at line 27842 of file sol.hpp.

◆ stack_top()

int sol::state_view::stack_top ( ) const
inline

Definition at line 27838 of file sol.hpp.

◆ step_gc()

bool sol::state_view::step_gc ( int  step_size_kilobytes)
inline

Definition at line 27874 of file sol.hpp.

◆ stop_gc()

void sol::state_view::stop_gc ( )
inline

Definition at line 27891 of file sol.hpp.

◆ supports_gc_mode()

bool sol::state_view::supports_gc_mode ( gc_mode  mode) const
inlinenoexcept

Definition at line 27848 of file sol.hpp.

◆ traverse_get()

template<typename T , typename... Keys>
decltype(auto) sol::state_view::traverse_get ( Keys &&...  keys) const
inline

Definition at line 27972 of file sol.hpp.

◆ traverse_set()

template<typename... Args>
state_view& sol::state_view::traverse_set ( Args &&...  args)
inline

Definition at line 27977 of file sol.hpp.

◆ unsafe_script() [1/4]

template<typename E >
unsafe_function_result sol::state_view::unsafe_script ( const string_view code,
const basic_environment< E > &  env,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27669 of file sol.hpp.

◆ unsafe_script() [2/4]

unsafe_function_result sol::state_view::unsafe_script ( const string_view code,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27686 of file sol.hpp.

◆ unsafe_script() [3/4]

template<typename E >
unsafe_function_result sol::state_view::unsafe_script ( lua_Reader  reader,
void *  data,
const basic_environment< E > &  env,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27642 of file sol.hpp.

◆ unsafe_script() [4/4]

unsafe_function_result sol::state_view::unsafe_script ( lua_Reader  reader,
void *  data,
const std::string &  chunkname = detail::default_chunk_name(),
load_mode  mode = load_mode::any 
)
inline

Definition at line 27659 of file sol.hpp.

◆ unsafe_script_file() [1/2]

template<typename E >
unsafe_function_result sol::state_view::unsafe_script_file ( const std::string &  filename,
const basic_environment< E > &  env,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27696 of file sol.hpp.

◆ unsafe_script_file() [2/2]

unsafe_function_result sol::state_view::unsafe_script_file ( const std::string &  filename,
load_mode  mode = load_mode::any 
)
inline

Definition at line 27710 of file sol.hpp.

Member Data Documentation

◆ global

global_table sol::state_view::global
private

Definition at line 27241 of file sol.hpp.

◆ L

lua_State* sol::state_view::L
private

Definition at line 27239 of file sol.hpp.

◆ reg

table sol::state_view::reg
private

Definition at line 27240 of file sol.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:53