MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ lila_add_header()

MAYAFLUX_HOST_API bool MayaFlux::Host::Live::lila_add_header ( const std::string &  filename)

Stage a header for inclusion in the Lila interpreter.

Resolves the header's directory and pre-evaluates the include so the type is available to JIT clients without manual inclusion.

Parameters
filenameHeader filename to find and include, e.g. "Dust.hpp"
Returns
true if the file was found.

Definition at line 130 of file Runtime.cpp.

131{
132 auto dir = find_include_dir(filename);
133 if (!dir) {
134 LILA_WARN(Lila::Emitter::SYSTEM,
135 "lila_add_header: could not find " + filename);
136 return false;
137 }
138 lila_add_include_path(dir->string());
139 lila_eval("#include \"" + filename + "\"");
140 return true;
141}
#define LILA_WARN(emitter, msg)
std::optional< std::filesystem::path > find_include_dir(const std::string &filename)
Find the directory containing a header staged for inclusion.
Definition Runtime.cpp:99

References find_include_dir(), lila_add_include_path(), lila_eval(), and LILA_WARN.

+ Here is the call graph for this function: