6
我不確定我瞭解V8的體系結構(是的,我已閱讀過它的文檔)。瞭解Google V8的體系結構
在C#與v8sharp包裝我寫這樣的事情,例如:
namespace App
{
class Point
{
public Point() { }
public Point(double x, double y) {
this.X = x;
this.Y = y;
}
public double X { get; set; }
public double Y { get; set; }
}
}
static class Program
{
static void Main() {
//registering with v8sharp
V8Engine engine = V8Engine.Create();
engine.Register<App.Point>();
//execute javascript
object rtn = engine.Execute("new App.Point(10, 10);");
}
}
我怎麼會寫在標準C++同樣的事情,沒有這個包裝?
謝謝。
我還沒有與V8相同的工作到你的,但我想知道如果文檔,你的意思是,你已經還查看了process.cc示例(http://code.google.com/p/v8/source/browse/trunk/samples/process.cc)和api.h(http://code.google.com /p/v8/source/browse/trunk/src/api.h)? – 2010-06-28 01:19:27