You probably want to use ObjectWrap. Have you read: http://nodejs.org/docs/latest/api/addons.html#addons_wrapping_c_objects ?
On Wed, Jan 15, 2014 at 1:34 AM, Kevin Ingwersen <[email protected]>wrote: > Hallo! :) > > I want to create some nodejs bindings to FLTK. But, the problem is, that I > do not want to change half the library just to extend from > Node::ObjectWrap. In fact, I have seen a rather confusing, but working, > example on github to do exactly as I wish. > > Can someone show me the basics of how this is done? For an easier example, > let’s assume the following C++ class: > > class TaskRunner { > public: > TaskRunner(std::string cmd); > bool hasExited(); > bool wait(); > int getExitCode(); > void writeTo(std::string content); > private: > bool prepairPipes(); > void destroyPipes(); > }; > > Now, imagine I can not change this class for some reason. How can I make > it accessible thru nodejs still? > > Kind regards, > Ingwie! > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
