|
|
| ChaiScript (std::vector< std::string > t_modulepaths={}, std::vector< std::string > t_usepaths={}, std::vector< Options > t_opts=chaiscript::default_options()) |
| |
|
virtual | ~ChaiScript_Basic ()=default |
| | Virtual destructor for ChaiScript.
|
| |
| | ChaiScript_Basic (const ModulePtr &t_lib, std::unique_ptr< parser::ChaiScript_Parser_Base > &&parser, std::vector< std::string > t_module_paths={}, std::vector< std::string > t_use_paths={}, const std::vector< chaiscript::Options > &t_opts=chaiscript::default_options()) |
| | Constructor for ChaiScript. More...
|
| |
| | ChaiScript_Basic (std::unique_ptr< parser::ChaiScript_Parser_Base > &&parser, std::vector< std::string > t_module_paths={}, std::vector< std::string > t_use_paths={}, const std::vector< chaiscript::Options > &t_opts=chaiscript::default_options()) |
| | Constructor for ChaiScript. More...
|
| |
|
parser::ChaiScript_Parser_Base & | get_parser () noexcept |
| |
|
const Boxed_Value | eval (const AST_Node &t_ast) |
| |
|
AST_NodePtr | parse (const std::string &t_input, const bool t_debug_print=false) |
| |
|
std::string | get_type_name (const Type_Info &ti) const |
| |
|
template<typename T > |
| std::string | get_type_name () const |
| |
| Boxed_Value | use (const std::string &t_filename) |
| | Loads and parses a file. More...
|
| |
| ChaiScript_Basic & | add_global_const (const Boxed_Value &t_bv, const std::string &t_name) |
| | Adds a constant object that is available in all contexts and to all threads. More...
|
| |
| ChaiScript_Basic & | add_global (const Boxed_Value &t_bv, const std::string &t_name) |
| | Adds a mutable object that is available in all contexts and to all threads. More...
|
| |
|
ChaiScript_Basic & | set_global (const Boxed_Value &t_bv, const std::string &t_name) |
| |
| State | get_state () const |
| | Returns a state object that represents the current state of the global system. More...
|
| |
| void | set_state (const State &t_state) |
| | Sets the state of the system. More...
|
| |
| std::map< std::string, Boxed_Value > | get_locals () const |
| |
| void | set_locals (const std::map< std::string, Boxed_Value > &t_locals) |
| | Sets all of the locals for the current thread state. More...
|
| |
| template<typename T > |
| ChaiScript_Basic & | add (const T &t_t, const std::string &t_name) |
| | Adds a type, function or object to ChaiScript. More...
|
| |
| ChaiScript_Basic & | add (const Type_Conversion &d) |
| | Add a new conversion for upcasting to a base class. More...
|
| |
| ChaiScript_Basic & | add (const ModulePtr &t_p) |
| | Adds all elements of a module to ChaiScript runtime. More...
|
| |
| std::string | load_module (const std::string &t_module_name) |
| | Load a binary module from a dynamic library. More...
|
| |
| void | load_module (const std::string &t_module_name, const std::string &t_filename) |
| | Load a binary module from a dynamic library. More...
|
| |
| Boxed_Value | operator() (const std::string &t_script, const Exception_Handler &t_handler=Exception_Handler()) |
| | Evaluates a string. More...
|
| |
| template<typename T > |
| T | eval (const std::string &t_input, const Exception_Handler &t_handler=Exception_Handler(), const std::string &t_filename="__EVAL__") |
| | Evaluates a string and returns a typesafe result. More...
|
| |
|
template<typename Type > |
| decltype(auto) | boxed_cast (const Boxed_Value &bv) const |
| | casts an object while applying any Dynamic_Conversion available
|
| |
| Boxed_Value | eval (const std::string &t_input, const Exception_Handler &t_handler=Exception_Handler(), const std::string &t_filename="__EVAL__") |
| | Evaluates a string. More...
|
| |
| Boxed_Value | eval_file (const std::string &t_filename, const Exception_Handler &t_handler=Exception_Handler()) |
| | Loads the file specified by filename, evaluates it, and returns the result. More...
|
| |
| template<typename T > |
| T | eval_file (const std::string &t_filename, const Exception_Handler &t_handler=Exception_Handler()) |
| | Loads the file specified by filename, evaluates it, and returns the type safe result. More...
|
| |
| void | import (const std::string &t_namespace_name) |
| | Imports a namespace object into the global scope of this ChaiScript instance. More...
|
| |
| void | register_namespace (const std::function< void(Namespace &)> &t_namespace_generator, const std::string &t_namespace_name) |
| | Registers a namespace generator, which delays generation of the namespace until it is imported, saving memory if it is never used. More...
|
| |