returning a struct from C++ addon to JS

15 views
Skip to first unread message

NodeNinja

unread,
Aug 27, 2016, 6:35:22 PM8/27/16
to nodejs
Basically I'm trying to create a node module.
And in one of the functions I have to return a struct from C++ to JS (actually its a pointer to a structure).
Now this structure has pointers to other objects inside, so I don't think its as easy as creating an Object and setting properties onto it.

So how do I pass this from C++ native addon to JS?
I remember someone mentioning that Object Templates are the way to go but haven't found any definiitve examples.

This page gives good overview of Object Templates.
Reply all
Reply to author
Forward
0 new messages