File v8pp/context.hpp contains v8pp::context class
that simplifies V8 embedding and maintains custom plugins
registry. The v8pp::context usage is optional.
Constructor of v8pp::context has following optional arguments:
v8::Isolate* isolate = null: create a new one ifnullptrv8::ArrayBuffer::Allocator* allocator = null: use a predefinedmalloc/freeallocator ifnullptradd_default_global_methods = true: add these functions to theglobalJavaScript object:require(filename)- load a plugin module fromfilenamerun(filename)- run a JavaScript code fromfile
Context class also supports binding of C++ classes and functions into the
global object similar to v8pp::module