|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Embedded Clang interpreter for live code evaluation in MayaFlux. More...
#include <ClangInterpreter.hpp>
Collaboration diagram for Lila::ClangInterpreter:Classes | |
| struct | EvalResult |
| Result of code evaluation. More... | |
| struct | Impl |
Public Member Functions | |
| void | add_compile_flag (const std::string &flag) |
| Adds a compile flag for code evaluation. | |
| void | add_include_path (const std::string &path) |
| Adds an include path for code evaluation. | |
| void | add_library_path (const std::string &path) |
| Adds a library path (not yet implemented) | |
| ClangInterpreter () | |
| Constructs a ClangInterpreter instance. | |
| ClangInterpreter (ClangInterpreter &&) noexcept | |
| ClangInterpreter (const ClangInterpreter &)=delete | |
| EvalResult | eval (const std::string &code) |
| Evaluates a code snippet. | |
| EvalResult | eval_file (const std::string &filepath) |
| Evaluates a code file by including it. | |
| std::vector< std::string > | get_defined_symbols () |
| Gets a list of all defined symbols. | |
| std::string | get_last_error () const |
| Gets the last error message. | |
| void * | get_symbol_address (const std::string &name) |
| Gets the address of a symbol defined in the interpreter. | |
| bool | initialize (bool skip_host_library_load=false) |
| Initialize the Clang interpreter. | |
| ClangInterpreter & | operator= (ClangInterpreter &&) noexcept |
| ClangInterpreter & | operator= (const ClangInterpreter &)=delete |
| void | reset () |
| Resets the interpreter, clearing all state. | |
| void | set_target_triple (const std::string &triple) |
| Sets the target triple for code generation. | |
| void | shutdown () |
| Shuts down the interpreter and releases resources. | |
| ~ClangInterpreter () | |
| Destructor; shuts down the interpreter if active. | |
Private Member Functions | |
| bool | create_interpreter () |
| void | detect_system_includes () |
| void | extract_symbols_from_code (const std::string &code) |
| std::string | preprocess_code (const std::string &code) |
| bool | setup_compiler_instance () |
Private Attributes | |
| std::unique_ptr< Impl > | m_impl |
| Internal implementation details. | |
| std::string | m_last_error |
Embedded Clang interpreter for live code evaluation in MayaFlux.
The ClangInterpreter class provides an interface for compiling and executing C++ code snippets at runtime using Clang's incremental interpreter. It is the core engine behind Lila's live coding capabilities, enabling real-time code evaluation, symbol lookup, and dynamic integration of user code.
This class is intended for internal use by Lila and is not exposed to end users directly.
Definition at line 35 of file ClangInterpreter.hpp.