Issue 144: Easy C++ Wrapper for Embedding
http://code.google.com/p/v8/issues/detail?id=144
New issue report by [EMAIL PROTECTED]:
When you want to make functions of a C++ class accessible many
repeating code (e.g. for unwrapping) has to be written. To make this
more easy i've wrote a nice template class called CppWrapper.
With this you only have to map the C++ name to a name in JavaScript.
Example:
v8::CppWrapper<Point> point_wrapper;
point_wrapper.SetAccessor<int>("x", &Point::getX, &Point::setX);
point_wrapper.SetAccessor<int>("y", &Point::getY, &Point::setY);
point_wrapper.SetFunction<bool>("isNull", &Point::isNull);
It compiles with GCC 4.3 and MSVC 2005.
Attachments:
v8cppwrapper.h 52.2 KB
Issue attributes:
Status: New
Owner: ----
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---