|
MayaFlux 0.1.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 | |
| ClangInterpreter () | |
| Constructs a ClangInterpreter instance. | |
| ~ClangInterpreter () | |
| Destructor; shuts down the interpreter if active. | |
| ClangInterpreter (const ClangInterpreter &)=delete | |
| ClangInterpreter & | operator= (const ClangInterpreter &)=delete |
| ClangInterpreter (ClangInterpreter &&) noexcept | |
| ClangInterpreter & | operator= (ClangInterpreter &&) noexcept |
| bool | initialize () |
| Initializes the Clang interpreter and prepares for code evaluation. | |
| void | shutdown () |
| Shuts down the interpreter and releases resources. | |
| EvalResult | eval (const std::string &code) |
| Evaluates a code snippet. | |
| EvalResult | eval_file (const std::string &filepath) |
| Evaluates a code file by including it. | |
| void * | get_symbol_address (const std::string &name) |
| Gets the address of a symbol defined in the interpreter. | |
| std::vector< std::string > | get_defined_symbols () |
| Gets a list of all defined symbols. | |
| 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) | |
| void | add_compile_flag (const std::string &flag) |
| Adds a compile flag for code evaluation. | |
| void | set_target_triple (const std::string &triple) |
| Sets the target triple for code generation. | |
| void | reset () |
| Resets the interpreter, clearing all state. | |
| std::string | get_last_error () const |
| Gets the last error message. | |
Private Member Functions | |
| bool | setup_compiler_instance () |
| bool | create_interpreter () |
| std::string | preprocess_code (const std::string &code) |
| void | extract_symbols_from_code (const std::string &code) |
| void | detect_system_includes () |
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.