Skip to content
Flecs v4.1
mixin.inl File Reference

Script world mixin. More...

Go to the source code of this file.

Functions

int script_run (const char *name, const char *str) const
 Run a script.
int script_run_file (const char *filename) const
 Run a script from a file.
script_builder script (const char *name=nullptr) const
 Build a script.
parsed_script script_parse (const char *name, const char *code, const ecs_script_eval_desc_t *desc=nullptr, ecs_script_eval_result_t *result=nullptr) const
int script_update (flecs::entity_t script, const char *code, flecs::entity_t instance=0) const
function_builder function (const char *name) const
function_builder method (flecs::entity_t type, const char *name) const
template<typename T>
function_builder method (const char *name) const
template<typename T>
flecs::entity const_var (const char *name, const T &value, flecs::entity_t parent=0) const
template<typename T>
flecs::entity mut_var (const char *name, const T &value, flecs::entity_t parent=0) const
template<typename T>
int set_mut_var (const char *name, const T &value) const
flecs::string to_expr (flecs::entity_t tid, const void *value)
 Convert a value to a string.
template<typename T>
flecs::string to_expr (const T *value)
 Convert a value to a string.
template<typename T>
T get_const_var (const char *name, const T &default_value={}) const
 Get the value of an exported script variable.
template<typename T>
void get_const_var (const char *name, T &out, const T &default_value={}) const
 Get the value of an exported script variable.
template<typename T>
T get_mut_var (const char *name, const T &default_value={}) const
 Get the value of an exported script mut variable.
template<typename T>
void get_mut_var (const char *name, T &out, const T &default_value={}) const
 Get the value of an exported script mut variable.

Detailed Description

Script world mixin.

Definition in file mixin.inl.