1 #ifndef INCLUDEJS_ENGINE_H_
2 #define INCLUDEJS_ENGINE_H_
7 #include "engine_export.h"
9 #include <includejs/engine_context.h>
10 #include <includejs/engine_error.h>
11 #include <includejs/engine_function.h>
12 #include <includejs/engine_value.h>
15 #include <initializer_list>
26 class INCLUDEJS_ENGINE_EXPORT
Engine {
31 auto evaluate(
const std::filesystem::path &path) ->
Value;
32 auto evaluate(
const std::string &code,
33 const std::filesystem::path &path) ->
Value;
34 auto evaluate(std::ifstream &stream,
35 const std::filesystem::path &path) ->
Value;
38 #if !defined(INCLUDEJS_ENGINE_V8)
39 auto bind_function(std::initializer_list<std::string> location,
40 Function
function) -> void;
42 auto bind_global(std::initializer_list<std::string> location,
44 auto bind_global(std::initializer_list<std::string> location,
46 auto bind_global(std::initializer_list<std::string> location,
48 auto bind_global(std::initializer_list<std::string> location,
49 std::initializer_list<Value> values) -> void;
55 std::unique_ptr<Internal>
internal;
56 auto on_error(
const Value &exception) -> void;
Definition: engine_context.h:15
Definition: engine_value.h:30