v8pp::class_::destroy()function to delete all wrapped C++objects and the
I uploaded my changes to github. my version of v8pp::context is not finished though. A lot of that was testing around to see what works. Though I eventually will add a callback function for context creation that would allow you to create the global object as a v8pp::class_.
I added interceptors to v8pp::class_. which is similar to the property. any_object.h was just stuff I was testing out. hopefully allowing a cpp function to accept either a cpp object or a v8 object. I just added v8pp::Function to that file which allows for accepting a function that is either from v8 or from cpp and if the object is passed to v8 with a cpp function that function would be converted so that It could be used within v8. also with that I enabled using std::function as a function withing v8pp.
reference_tracker.h is just for debugging memory leaks. I should probably change it to a macro.
I also added some destroy functions in class_ though those were kinda just put together quickly. also added set_js_const which allows to add a const value on to the js function.
the interceptors don't include all the static asserts needed. Haven't really tried merging it to your version yet. I need to redo all my changes to v8pp::context first lol.
Context.hpp is now updated to use callback functions to create a global object with class_
Added convert functions to automatically convert an object into v8 without importing/referencing first
Added insertobject functions in class to insert pointers into a v8 object that was already created
- Requires 2 aligned pointer slots.
error LNK2019: unresolved external symbol "public: __thiscall v8pp::context::context(class v8::Isolate *,class v8::ArrayBuffer::Allocator *,bool)" (??0context@v8pp@@QAE@PAVIsolate@v8@@PAVAllocator@ArrayBuffer@3@_N@Z) error LNK2019: unresolved external symbol "public: __thiscall v8pp::context::~context(void)" (??1context@v8pp@@QAE@XZ)
v8pp::contextis used mostly for test and in a couple of projects those had V8 embedded. Intent for
V8PP_HEADER_ONLYwas to use the library without installation in projects for Node.js native add-ons. There you could just add the library as an NPM dependency in
package.json. See also these comments: https://github.com/pmed/v8pp/issues/75#issuecomment-397034400 https://github.com/pmed/v8pp/issues/75#issuecomment-397249100