|
|
| LuaInterpreter () |
| | LuaInterpreter constructor.
|
| |
|
| ~LuaInterpreter () override |
| | LuaInterpreter destructor.
|
| |
| void | reset () override |
| | Clears all variables, restarts from initial state.
|
| |
| bool | execute (const std::string &command, bool save_in_history, bool log) override |
| | Executes a single line of code in the interpreted language.
|
| |
| bool | execute_file (const std::string &file_name) override |
| | Executes commands from a given file.
|
| |
| Any | resolve (const std::string &id, bool quiet=true) const override |
| | Finds a variable by id.
|
| |
| void | bind (const std::string &id, const Any &value) override |
| | Binds a value to a variable.
|
| |
| Any | eval (const std::string &expression, bool quiet=true) const override |
| | Evaluates a string with an expression.
|
| |
| lua_State * | lua_state () |
| | Gets the LUA state.
|
| |
| void | list_names (std::vector< std::string > &names) const override |
| | Lists the variable names in this Scope.
|
| |
|
| Interpreter () |
| | Interpreter constructor.
|
| |
| void | inspect_meta_type (MetaType *meta_type) |
| | Outputs to the logger the methods, slots, properties of a given MetaClass.
|
| |
|
void | list_classes () |
| | Outputs to the logger the names of all classes registered to GOM.
|
| |
| void | bind_object (const std::string &id, Object *object) |
| | Binds an object to a variable.
|
| |
| Object * | resolve_object (const std::string &id, bool quiet=true) const |
| | Finds an objet by id.
|
| |
| Object * | resolve_object_by_global_id (const std::string &id, bool quiet=true) const |
| | Finds an objet by global id.
|
| |
| Object * | eval_object (const std::string &expression, bool quiet=true) const |
| | Evaluates a string with an expression.
|
| |
| std::string | eval_string (const std::string &expression, bool quiet=true) const |
| | Evaluates a string with an expression.
|
| |
| virtual MetaType * | resolve_meta_type (const std::string &type_name) const |
| | Finds a MetaType by name.
|
| |
| virtual bool | bind_meta_type (MetaType *mtype) |
| | Binds a MetaType.
|
| |
| virtual Object * | create (const ArgList &args) |
| | Creates an object.
|
| |
| virtual std::string | get_environment_value (const std::string &name) |
| | Gets the value of a Geogram environment value.
|
| |
| virtual void | set_environment_value (const std::string &name, const std::string &value) |
| | Sets the value of an environment variable.
|
| |
| virtual void | out (const std::string &message, const std::string &tag="GOM") |
| | Displays a message in the terminal or console.
|
| |
| virtual void | err (const std::string &message, const std::string &tag="GOM") |
| | Displays an error message in the terminal or console.
|
| |
| virtual void | warn (const std::string &message, const std::string &tag="GOM") |
| | Displays a warning message in the terminal or console.
|
| |
| virtual void | status (const std::string &message) |
| | Displays a status message.
|
| |
| virtual void | append_dynamic_libraries_path (const std::string &path) |
| | Adds a path where dynamic libraries can be loaded.
|
| |
| virtual bool | load_module (const std::string &module_name) |
| | Loads a plug-in.
|
| |
| virtual Connection * | connect (Request *from, Callable *to) |
| | Connects a signal to a callable.
|
| |
| Interpreter * | interpreter (const std::string &language) |
| | Gets an interpreter for a given language.
|
| |
| Interpreter * | interpreter_by_file_extension (const std::string &extension) |
| | Gets an interpreter for a given language by file extension.
|
| |
| void | search (const std::string &needle, const std::string &path="") override |
| | Displays the names of all objects that contain a substring.
|
| |
| const std::string & | get_language () const |
| | Gets the name of the interpreted language.
|
| |
| const std::string & | get_filename_extension () const |
| | Gets the filename extensions for the interpreted language.
|
| |
| Scope * | get_globals () const |
| | Gets the Scope with the global variables.
|
| |
| Scope * | get_meta_types () const |
| | Gets the Scope with the meta types.
|
| |
|
| ~Interpreter () override |
| | Interpreter destructor.
|
| |
| Object * | create (const std::string &classname, const ArgList &args) |
| | Creates an object from a classname and arguments list.
|
| |
| virtual void | automatic_completion (const std::string &line, index_t startw, index_t endw, const std::string &cmpword, std::vector< std::string > &matches) |
| | Gets the possible automatic completions from a partial command entered by the user in the command line.
|
| |
| virtual void | save_history (const std::string &file_name) const |
| | Saves the history to a file.
|
| |
|
virtual void | clear_history () |
| | Clears the history.
|
| |
| void | add_to_history (const std::string &command) |
| | Adds a command line to the history.
|
| |
| size_t | history_size () const |
| | Gets the size of the history.
|
| |
| std::string | history_line (unsigned int l) const |
| | Gets one of the commands in the history by line index.
|
| |
| | Object (bool transient=false) |
| | Object constructor.
|
| |
|
| ~Object () override |
| | Object destructor.
|
| |
| virtual MetaClass * | meta_class () const |
| | Gets the meta class.
|
| |
| virtual void | set_meta_class (MetaClass *mclass) |
| | Sets the meta class.
|
| |
| unsigned int | id () const |
| | Gets the identifier of this object.
|
| |
| std::string | string_id () const |
| | Gets the unique string identifier.
|
| |
| bool | has_method (const std::string &method_name) const |
| | Tests whether a method is defined.
|
| |
| virtual bool | invoke_method (const std::string &method_name, const ArgList &args, Any &ret_val) |
| | Invokes a method by method name and argument list, and gets the return value.
|
| |
| bool | invoke_method (const std::string &method_name, const ArgList &args) |
| | Invokes a method by method name and argument list.
|
| |
| bool | invoke_method (const std::string &method_name) |
| | Invokes a method by method name.
|
| |
| bool | has_property (const std::string &prop_name) const |
| | Tests whether a property is defined.
|
| |
| virtual bool | get_property (const std::string &prop_name, std::string &prop_value) const |
| | Gets a property.
|
| |
| virtual Connection * | connect_signal_to_slot (const std::string &signal_name, Object *to, const std::string &slot_name) |
| | Connects a signal with a slot of another object.
|
| |
| virtual void | add_connection (Connection *connection) |
| | Adds a connection to this object.
|
| |
| virtual void | remove_connection (Connection *connection) |
| | Removes a connection to this object.
|
| |
| virtual void | get_element (index_t i, Any &value) const |
| | Gets an element by index.
|
| |
| virtual void | set_element (index_t i, const Any &value) |
| | Sets an element by index.
|
| |
| void | get_element (index_t item, index_t component, Any &value) const |
| | Gets an element by item and component.
|
| |
| void | set_element (index_t item, index_t component, const Any &value) |
| | Sets an element by item and component.
|
| |
| virtual index_t | get_dimension () const |
| | Gets the number of elements per item.
|
| |
| bool | get_signals_enabled () const |
| | Tests wheter signals are enabled.
|
| |
| void | set_signals_enabled (bool value) |
| | Enables or disables signals.
|
| |
| bool | get_slots_enabled () const |
| | Tests wheter slots are enabled.
|
| |
| void | set_slots_enabled (bool value) |
| | Enables or disables slots.
|
| |
| MetaClass * | get_meta_class () const |
| | Gets the meta class.
|
| |
| std::string | get_string_id () const |
| | Gets the unique string identifier.
|
| |
| virtual std::string | get_doc () const |
| | Gets the documentation.
|
| |
| virtual Sign | compare (const Object *other) const |
| | Compares this object with another one.
|
| |
| virtual bool | is_a (const MetaType *type) const |
| | Tests whether this object inherits a given type.
|
| |
| void | disconnect () |
| | Removes all connections from signals of this objects.
|
| |
| void | enable_signals () |
| | Enables signals.
|
| |
| void | disable_signals () |
| | Disables signals.
|
| |
| void | enable_slots () |
| | Enables slots.
|
| |
| void | disable_slots () |
| | Disables slots.
|
| |
| void | set_properties (const ArgList &args) |
| | Sets several properties in a single call.
|
| |
| virtual bool | set_property (const std::string &name, const std::string &value) |
| | Sets an individual property.
|
| |
| void | help () const |
| | Displays some help about this object.
|
| |
| virtual bool | set_property (const std::string &name, const Any &value) |
| | Sets an individual property.
|
| |
| virtual bool | get_property (const std::string &prop_name, Any &prop_value) const |
| | Gets a property.
|
| |
| void | ref () const |
| | Increments the reference count.
|
| |
| void | unref () const |
| | Decrements the reference count.
|
| |
| bool | is_shared () const |
| | Check if the object is shared.
|
| |
| int | nb_refs () const |
| | Gets the number of references that point to this object.
|
| |
|
| virtual void | adjust_lua_state () |
| | Adjusts LUA state to recover from errors.
|
| |
| void | get_keys (const std::string &context, std::vector< std::string > &keys) override |
| | Gets all possible keys in a certain context.
|
| |
| std::string | name_value_pair_call (const std::string &args) const override |
| | Transforms a list of name-value pairs arguments.
|
| |
| void | filename_completion (const std::string &prefix, std::vector< std::string > &completions) |
| | Gets all possible filenames starting from a certain prefix.
|
| |
| void | filter_completion_candidates (const std::string &prefix, std::vector< std::string > &completions) |
| | Keeps in a list of completion only those that start with a given prefix.
|
| |
| virtual void | get_keys (Any &context, std::vector< std::string > &keys) |
| | Gets all possible keys in a certain context.
|
| |
| void | inspect_method (Object *object, MetaMethod *mmethod) |
| | Displays the prototype of a given method of an object.
|
| |
| void | inspect_meta_class (Object *object, MetaClass *mclass) |
| | Displays a meta class.
|
| |
| void | inspect_meta_method (MetaMethod *mmethod) |
| | Outputs to the logger the signature of a method.
|
| |
| void | set_language (const std::string &language) |
| | Sets the name of the interpreted language.
|
| |
| void | set_filename_extension (const std::string &extension) |
| | Sets the filename extensions for the interpreted language.
|
| |
| virtual std::string | stringify (const std::string &str) const |
| | Transforms a string into a string constant in the interpreted language.
|
| |
| virtual bool | emit_signal (const std::string &signal_name, const ArgList &args, bool called_from_slot=false) |
| | Emits a signal and calls the slots it is connected to.
|
| |
| | Counted () |
| | Creates a reference counted object.
|
| |
| virtual | ~Counted () |
| | Destroys a reference counted object.
|
| |
The main class that interfaces the Python interpreter with Graphite.
Definition at line 59 of file lua_interpreter.h.