Class jac::Module
A wrapper around JSModuleDef that allows for easy exporting of values.
#include <machine.h>
Public Functions
Type | Name |
---|---|
Module (ContextRef ctx, std::string name) Create a new module in the given context. Should not be called directly, use MachineBase::newModule instead. |
|
Module (const Module &) = delete |
|
Module (Module && other) |
|
void | addExport (std::string name, Value val) Add a value to the module's exports. |
JSModuleDef * | get () Get the underlying JSModuleDef* for this module. |
Module & | operator= (const Module &) = delete |
Module & | operator= (Module && other) |
Public Functions Documentation
function Module [1/3]
Create a new module in the given context. Should not be called directly, use MachineBase::newModule instead.
Parameters:
ctx
context to work inname
name of the module
function Module [2/3]
function Module [3/3]
function addExport
Add a value to the module's exports.
Parameters:
name
name of the exportval
the value to export
function get
Get the underlying JSModuleDef* for this module.
Returns:
JSModuleDef*
function operator=
function operator=
The documentation for this class was generated from the following file src/jac/machine/machine.h