![]() |
Spicy
|
#include <jit.h>
Public Member Functions | |
CxxCode (const hilti::rt::filesystem::path &path) | |
CxxCode (const std::string &id, std::istream &code) | |
CxxCode (const detail::cxx::Unit &u) | |
bool | save (const hilti::rt::filesystem::path &p) const |
bool | save (std::ostream &out) const |
auto | code () const |
auto | isLoaded () const |
const std::string & | id () const |
Protected Member Functions | |
bool | load (const hilti::rt::filesystem::path &path) |
bool | load (const std::string &id, std::istream &in) |
Container for C++ code compiled from a HILTI source file
|
inline |
Reads C++ code from a file.
path | file to read |
|
inline |
Reads C++ code from an input stream.
id | name to associate with the input for logging and error messages. |
code | stream to read from |
|
explicit |
Initializes code instance from in-memory compiler output. For internal use.
u | unit to initialize code instance from |
|
inline |
Returns C++ code as a string.
|
inline |
Returns a name associated with the instance's C++ code. If the code has been read from a file, that's the path; otherwise the ID specifed when initialized.
|
inline |
Returns true if this instance has been initialized with any C++ code.
|
protected |
Loads C++ code from a file.
path | file to read from |
|
protected |
Loads C++ code from an input stream.
id | name to associate with the input for logging and error messages. |
path | stream to read from |
bool CxxCode::save | ( | const hilti::rt::filesystem::path & | p | ) | const |
Saves C++ code into a file.
p | file to write to |
bool CxxCode::save | ( | std::ostream & | out | ) | const |
Writes C++ code into an output stream.
out | stream to write to |