summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/ecmascript/v8
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/v8')
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp125
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h22
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp14
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp16
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOM.h11
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp12
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp76
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp20
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp52
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp6
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp34
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp104
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h52
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp6
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp6
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp12
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp6
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp76
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h95
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp16
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h4
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp4
42 files changed, 475 insertions, 374 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
index ac1fbbd..9f04670 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
@@ -1,7 +1,8 @@
#include "uscxml/Common.h"
#include "V8DataModel.h"
-#include "dom/V8DOM.h"
#include "dom/V8Document.h"
+#include "dom/V8SCXMLEvent.h"
+
#include "uscxml/Message.h"
#include <glog/logging.h>
@@ -29,10 +30,10 @@ boost::shared_ptr<DataModelImpl> V8DataModel::create(Interpreter* interpreter) {
v8::Locker locker;
v8::HandleScope scope;
- Arabica::DOM::V8DOM* dom = new Arabica::DOM::V8DOM();
+ dm->_dom = new Arabica::DOM::V8DOM();
// dom->interpreter = interpreter;
- dom->xpath = new Arabica::XPath::XPath<std::string>();
- dom->xpath->setNamespaceContext(interpreter->getNSContext());
+ dm->_dom->xpath = new Arabica::XPath::XPath<std::string>();
+ dm->_dom->xpath->setNamespaceContext(interpreter->getNSContext());
// see http://stackoverflow.com/questions/3171418/v8-functiontemplate-class-instance
@@ -49,8 +50,8 @@ boost::shared_ptr<DataModelImpl> V8DataModel::create(Interpreter* interpreter) {
v8::Handle<v8::Object> docObj = docCtor->NewInstance();
Arabica::DOM::V8Document::V8DocumentPrivate* privData = new Arabica::DOM::V8Document::V8DocumentPrivate();
- privData->arabicaThis = new Arabica::DOM::Document<std::string>(interpreter->getDocument());
- privData->dom = dom;
+ privData->nativeObj = new Arabica::DOM::Document<std::string>(interpreter->getDocument());
+ privData->dom = dm->_dom;
docObj->SetInternalField(0, Arabica::DOM::V8DOM::toExternal(privData));
context->Global()->Set(v8::String::New("document"), docObj);
@@ -72,21 +73,12 @@ void V8DataModel::registerIOProcessor(const std::string& name, const IOProcessor
void V8DataModel::setSessionId(const std::string& sessionId) {
_sessionId = sessionId;
- v8::Locker locker;
- v8::HandleScope handleScope;
- v8::Context::Scope contextScope(_contexts.front());
- v8::Handle<v8::Object> global = _contexts.front()->Global();
-
- global->Set(v8::String::New("_sessionid"), v8::String::New(sessionId.c_str()));
+ assign("_sessionId", "'" + sessionId + "'");
}
void V8DataModel::setName(const std::string& name) {
_name = name;
- v8::HandleScope handleScope;
- v8::Context::Scope contextScope(_contexts.front());
- v8::Handle<v8::Object> global = _contexts.front()->Global();
-
- global->Set(v8::String::New("_name"), v8::String::New(name.c_str()));
+ assign("_name", "'" + name + "'");
}
V8DataModel::~V8DataModel() {
@@ -117,25 +109,16 @@ void V8DataModel::setEvent(const Event& event) {
v8::Context::Scope contextScope(_contexts.front());
v8::Handle<v8::Object> global = _contexts.front()->Global();
- // this is unfortunate - can't we store the template in the object?
- if (_eventTemplate.IsEmpty()) {
- v8::Handle<v8::ObjectTemplate> localEventTemplate = v8::ObjectTemplate::New();
- localEventTemplate->SetInternalFieldCount(1); // we only have a single C++ object
- localEventTemplate->SetAccessor(v8::String::New("name"), V8DataModel::jsGetEventName);
- localEventTemplate->SetAccessor(v8::String::New("type"), V8DataModel::jsGetEventType);
- localEventTemplate->SetAccessor(v8::String::New("sendid"), V8DataModel::jsGetEventSendId);
- localEventTemplate->SetAccessor(v8::String::New("origin"), V8DataModel::jsGetEventOrigin);
- localEventTemplate->SetAccessor(v8::String::New("origintype"), V8DataModel::jsGetEventOriginType);
- localEventTemplate->SetAccessor(v8::String::New("invokeid"), V8DataModel::jsGetEventInvokeId);
- _eventTemplate = v8::Persistent<v8::ObjectTemplate>::New(localEventTemplate);
- }
+ v8::Handle<v8::Function> eventCtor = Arabica::DOM::V8SCXMLEvent::getTmpl()->GetFunction();
+ v8::Handle<v8::Object> eventObj = eventCtor->NewInstance();
- assert(_eventTemplate->InternalFieldCount() == 1);
- v8::Handle<v8::Object> eventJS = _eventTemplate->NewInstance();
- eventJS->SetInternalField(0, v8::External::New(&_event));
+ Arabica::DOM::V8SCXMLEvent::V8SCXMLEventPrivate* privData = new Arabica::DOM::V8SCXMLEvent::V8SCXMLEventPrivate();
+ privData->nativeObj = &_event;
+ privData->dom = _dom;
+ eventObj->SetInternalField(0, Arabica::DOM::V8DOM::toExternal(privData));
- eventJS->Set(v8::String::New("data"), getDataAsValue(event)); // set data part of _event
- global->Set(v8::String::New("_event"), eventJS);
+ eventObj->Set(v8::String::New("data"), getDataAsValue(event)); // set data part of _event
+ global->Set(v8::String::New("_event"), eventObj);
}
Data V8DataModel::getStringAsData(const std::string& content) {
@@ -254,56 +237,6 @@ v8::Handle<v8::Value> V8DataModel::jsIn(const v8::Arguments& args) {
return v8::Boolean::New(true);
}
-v8::Handle<v8::Value> V8DataModel::jsGetEventName(v8::Local<v8::String> property,
- const v8::AccessorInfo &info) {
- Event* event = static_cast<Event*>(v8::Local<v8::External>::Cast(info.Holder()->GetInternalField(0))->Value());
- return v8::String::New(event->name.c_str());
-}
-
-v8::Handle<v8::Value> V8DataModel::jsGetEventType(v8::Local<v8::String> property,
- const v8::AccessorInfo &info) {
- Event* event = static_cast<Event*>(v8::Local<v8::External>::Cast(info.Holder()->GetInternalField(0))->Value());
- switch (event->type) {
- case Event::PLATFORM:
- return v8::String::New("platform");
- break;
- case Event::INTERNAL:
- return v8::String::New("internal");
- break;
- case Event::EXTERNAL:
- return v8::String::New("external");
- break;
- default:
- return v8::String::New("");
- break;
- }
-}
-
-v8::Handle<v8::Value> V8DataModel::jsGetEventSendId(v8::Local<v8::String> property,
- const v8::AccessorInfo &info) {
- Event* event = static_cast<Event*>(v8::Local<v8::External>::Cast(info.Holder()->GetInternalField(0))->Value());
- return v8::String::New(event->sendid.c_str());
-
-}
-
-v8::Handle<v8::Value> V8DataModel::jsGetEventOrigin(v8::Local<v8::String> property,
- const v8::AccessorInfo &info) {
- Event* event = static_cast<Event*>(v8::Local<v8::External>::Cast(info.Holder()->GetInternalField(0))->Value());
- return v8::String::New(event->origin.c_str());
-}
-
-v8::Handle<v8::Value> V8DataModel::jsGetEventOriginType(v8::Local<v8::String> property,
- const v8::AccessorInfo &info) {
- Event* event = static_cast<Event*>(v8::Local<v8::External>::Cast(info.Holder()->GetInternalField(0))->Value());
- return v8::String::New(event->origintype.c_str());
-}
-
-v8::Handle<v8::Value> V8DataModel::jsGetEventInvokeId(v8::Local<v8::String> property,
- const v8::AccessorInfo &info) {
- Event* event = static_cast<Event*>(v8::Local<v8::External>::Cast(info.Holder()->GetInternalField(0))->Value());
- return v8::String::New(event->invokeid.c_str());
-}
-
bool V8DataModel::validate(const std::string& location, const std::string& schema) {
return true;
}
@@ -348,35 +281,13 @@ void V8DataModel::assign(const std::string& location, const Data& data) {
std::stringstream ssJSON;
ssJSON << data;
assign(location, ssJSON.str());
-// v8::Handle<v8::Object> variable = evalAsValue(location).As<v8::Object>();
-// assert(!variable.IsEmpty());
-// if (data.compound.size() > 0) {
-// std::map<std::string, Data>::const_iterator compoundIter = data.compound.begin();
-// while(compoundIter != data.compound.end()) {
-// variable->Set(v8::String::New(compoundIter->first.c_str()), getDataAsValue(compoundIter->second));
-// compoundIter++;
-// }
-// return;
-// } else if (data.array.size() > 0) {
-// std::list<Data>::const_iterator arrayIter = data.array.begin();
-// uint32_t index = 0;
-// while(arrayIter != data.array.end()) {
-// variable->Set(index++, getDataAsValue(*arrayIter));
-// arrayIter++;
-// }
-// } else if (data.type == Data::VERBATIM) {
-// assign(location, "'" + data.atom + "'");
-// } else {
-// assign(location, data.atom);
-// }
-
}
void V8DataModel::assign(const std::string& location, const std::string& expr) {
v8::Locker locker;
v8::HandleScope handleScope;
v8::Context::Scope contextScope(_contexts.back());
- evalAsValue((location + " = " + expr).c_str());
+ evalAsValue(location + " = " + expr);
}
v8::Handle<v8::Value> V8DataModel::evalAsValue(const std::string& expr) {
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h
index bcc9052..b99392f 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h
@@ -4,6 +4,7 @@
#include "uscxml/Interpreter.h"
#include <list>
#include <v8.h>
+#include "dom/V8DOM.h"
#ifdef BUILD_AS_PLUGINS
#include "uscxml/plugins/Plugins.h"
@@ -52,33 +53,14 @@ public:
virtual std::string evalAsString(const std::string& expr);
virtual bool evalAsBool(const std::string& expr);
- static v8::Handle<v8::Value> jsGetEventName(v8::Local<v8::String> property,
- const v8::AccessorInfo &info);
- static v8::Handle<v8::Value> jsGetEventType(v8::Local<v8::String> property,
- const v8::AccessorInfo &info);
- static v8::Handle<v8::Value> jsGetEventSendId(v8::Local<v8::String> property,
- const v8::AccessorInfo &info);
- static v8::Handle<v8::Value> jsGetEventOrigin(v8::Local<v8::String> property,
- const v8::AccessorInfo &info);
- static v8::Handle<v8::Value> jsGetEventOriginType(v8::Local<v8::String> property,
- const v8::AccessorInfo &info);
- static v8::Handle<v8::Value> jsGetEventInvokeId(v8::Local<v8::String> property,
- const v8::AccessorInfo &info);
-
static v8::Handle<v8::Value> jsIn(const v8::Arguments& args);
static v8::Handle<v8::Value> jsPrint(const v8::Arguments& args);
-
protected:
std::list<v8::Persistent<v8::Context> > _contexts;
- Interpreter* _interpreter;
-
- std::string _sessionId;
- std::string _name;
Event _event;
- v8::Persistent<v8::ObjectTemplate> _globalTemplate;
- v8::Persistent<v8::ObjectTemplate> _eventTemplate;
+ Arabica::DOM::V8DOM* _dom;
v8::Handle<v8::Value> evalAsValue(const std::string& expr);
virtual v8::Handle<v8::Value> getDataAsValue(const Data& data);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp
index dd11694..bee6042 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp
@@ -12,41 +12,43 @@ v8::Handle<v8::Value> V8Attr::nameAttrGetter(v8::Local<v8::String> property, con
v8::Local<v8::Object> self = info.Holder();
struct V8AttrPrivate* privData = V8DOM::toClassPtr<V8AttrPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getName().c_str());
+ return v8::String::New(privData->nativeObj->getName().c_str());
}
v8::Handle<v8::Value> V8Attr::specifiedAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8AttrPrivate* privData = V8DOM::toClassPtr<V8AttrPrivate >(self->GetInternalField(0));
- return v8::Boolean::New(privData->arabicaThis->getSpecified());
+ return v8::Boolean::New(privData->nativeObj->getSpecified());
}
v8::Handle<v8::Value> V8Attr::valueAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8AttrPrivate* privData = V8DOM::toClassPtr<V8AttrPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getValue().c_str());
+ return v8::String::New(privData->nativeObj->getValue().c_str());
}
void V8Attr::valueAttrSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8AttrPrivate* privData = V8DOM::toClassPtr<V8AttrPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localValue(value);
- privData->arabicaThis->setValue(*localValue);
+ privData->nativeObj->setValue(*localValue);
}
v8::Handle<v8::Value> V8Attr::ownerElementAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8AttrPrivate* privData = V8DOM::toClassPtr<V8AttrPrivate >(self->GetInternalField(0));
- Arabica::DOM::Element<std::string>* arbaicaRet = new Arabica::DOM::Element<std::string>(privData->arabicaThis->getOwnerElement());
+
+ if (!privData->nativeObj->getOwnerElement()) return v8::Undefined();
+ Arabica::DOM::Element<std::string>* arbaicaRet = new Arabica::DOM::Element<std::string>(privData->nativeObj->getOwnerElement());
v8::Handle<v8::Function> arbaicaRetCtor = V8Element::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Element::jsDestructor);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h
index 5cd4831..e290415 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8Attr {
public:
struct V8AttrPrivate {
V8DOM* dom;
- Arabica::DOM::Attr<std::string>* arabicaThis;
+ Arabica::DOM::Attr<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8AttrPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h
index d2543c1..a0b5ced 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8CDATASection {
public:
struct V8CDATASectionPrivate {
V8DOM* dom;
- Arabica::DOM::CDATASection<std::string>* arabicaThis;
+ Arabica::DOM::CDATASection<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8CDATASectionPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp
index 13c582a..459cf96 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp
@@ -11,21 +11,21 @@ v8::Handle<v8::Value> V8CharacterData::dataAttrGetter(v8::Local<v8::String> prop
v8::Local<v8::Object> self = info.Holder();
struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr<V8CharacterDataPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getData().c_str());
+ return v8::String::New(privData->nativeObj->getData().c_str());
}
void V8CharacterData::dataAttrSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr<V8CharacterDataPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localData(value);
- privData->arabicaThis->setData(*localData);
+ privData->nativeObj->setData(*localData);
}
v8::Handle<v8::Value> V8CharacterData::lengthAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr<V8CharacterDataPrivate >(self->GetInternalField(0));
- return v8::Integer::New(privData->arabicaThis->getLength());
+ return v8::Integer::New(privData->nativeObj->getLength());
}
v8::Handle<v8::Value> V8CharacterData::substringDataCallback(const v8::Arguments& args) {
if (args.Length() < 2)
@@ -36,7 +36,7 @@ v8::Handle<v8::Value> V8CharacterData::substringDataCallback(const v8::Arguments
unsigned long localOffset = args[0]->ToNumber()->Uint32Value();
unsigned long localCount = args[1]->ToNumber()->Uint32Value();
- std::string retVal = privData->arabicaThis->substringData(localOffset, localCount);
+ std::string retVal = privData->nativeObj->substringData(localOffset, localCount);
return v8::String::New(retVal.c_str());
}
@@ -49,7 +49,7 @@ v8::Handle<v8::Value> V8CharacterData::appendDataCallback(const v8::Arguments& a
struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr<V8CharacterDataPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localArg(args[0]);
- privData->arabicaThis->appendData(*localArg);
+ privData->nativeObj->appendData(*localArg);
return v8::Undefined();
}
@@ -63,7 +63,7 @@ v8::Handle<v8::Value> V8CharacterData::insertDataCallback(const v8::Arguments& a
unsigned long localOffset = args[0]->ToNumber()->Uint32Value();
v8::String::AsciiValue localArg(args[1]);
- privData->arabicaThis->insertData(localOffset, *localArg);
+ privData->nativeObj->insertData(localOffset, *localArg);
return v8::Undefined();
}
@@ -77,7 +77,7 @@ v8::Handle<v8::Value> V8CharacterData::deleteDataCallback(const v8::Arguments& a
unsigned long localOffset = args[0]->ToNumber()->Uint32Value();
unsigned long localCount = args[1]->ToNumber()->Uint32Value();
- privData->arabicaThis->deleteData(localOffset, localCount);
+ privData->nativeObj->deleteData(localOffset, localCount);
return v8::Undefined();
}
@@ -92,7 +92,7 @@ v8::Handle<v8::Value> V8CharacterData::replaceDataCallback(const v8::Arguments&
unsigned long localCount = args[1]->ToNumber()->Uint32Value();
v8::String::AsciiValue localArg(args[2]);
- privData->arabicaThis->replaceData(localOffset, localCount, *localArg);
+ privData->nativeObj->replaceData(localOffset, localCount, *localArg);
return v8::Undefined();
}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h
index d9808a3..a86519b 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8CharacterData {
public:
struct V8CharacterDataPrivate {
V8DOM* dom;
- Arabica::DOM::CharacterData<std::string>* arabicaThis;
+ Arabica::DOM::CharacterData<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8CharacterDataPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h
index 8ff626e..b07bf19 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8Comment {
public:
struct V8CommentPrivate {
V8DOM* dom;
- Arabica::DOM::Comment<std::string>* arabicaThis;
+ Arabica::DOM::Comment<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8CommentPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOM.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOM.h
index 122a457..10528e8 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOM.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOM.h
@@ -9,12 +9,21 @@
static void jsDestructor(v8::Persistent<v8::Value> object, void* data) { \
v8::HandleScope handleScope; \
type* thing = static_cast<type*>(v8::Local<v8::External>::Cast(object->ToObject()->GetInternalField(0))->Value()); \
- delete thing->arabicaThis; \
+ delete thing->nativeObj; \
delete thing; \
object.Dispose(); \
object.Clear(); \
}
+#define V8_DESTRUCTOR_KEEP_WRAPPED(type) \
+static void jsDestructor(v8::Persistent<v8::Value> object, void* data) { \
+v8::HandleScope handleScope; \
+type* thing = static_cast<type*>(v8::Local<v8::External>::Cast(object->ToObject()->GetInternalField(0))->Value()); \
+delete thing; \
+object.Dispose(); \
+object.Clear(); \
+}
+
namespace Arabica {
namespace DOM {
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp
index 6d26cee..f7a7575 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp
@@ -16,7 +16,7 @@ v8::Handle<v8::Value> V8DOMImplementation::hasFeatureCallback(const v8::Argument
v8::String::AsciiValue localFeature(args[0]);
v8::String::AsciiValue localVersion(args[1]);
- bool retVal = privData->arabicaThis->hasFeature(*localFeature, *localVersion);
+ bool retVal = privData->nativeObj->hasFeature(*localFeature, *localVersion);
return v8::Boolean::New(retVal);
}
@@ -31,13 +31,13 @@ v8::Handle<v8::Value> V8DOMImplementation::createDocumentTypeCallback(const v8::
v8::String::AsciiValue localPublicId(args[1]);
v8::String::AsciiValue localSystemId(args[2]);
- Arabica::DOM::DocumentType<std::string>* retVal = new Arabica::DOM::DocumentType<std::string>(privData->arabicaThis->createDocumentType(*localQualifiedName, *localPublicId, *localSystemId));
+ Arabica::DOM::DocumentType<std::string>* retVal = new Arabica::DOM::DocumentType<std::string>(privData->nativeObj->createDocumentType(*localQualifiedName, *localPublicId, *localSystemId));
v8::Handle<v8::Function> retCtor = V8DocumentType::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8DocumentType::V8DocumentTypePrivate* retPrivData = new V8DocumentType::V8DocumentTypePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -56,15 +56,15 @@ v8::Handle<v8::Value> V8DOMImplementation::createDocumentCallback(const v8::Argu
struct V8DOMImplementationPrivate* privData = V8DOM::toClassPtr<V8DOMImplementationPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localQualifiedName(args[1]);
- Arabica::DOM::DocumentType<std::string>* localDoctype = V8DOM::toClassPtr<V8DocumentType::V8DocumentTypePrivate >(args[2]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::DocumentType<std::string>* localDoctype = V8DOM::toClassPtr<V8DocumentType::V8DocumentTypePrivate >(args[2]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Document<std::string>* retVal = new Arabica::DOM::Document<std::string>(privData->arabicaThis->createDocument(*localNamespaceURI, *localQualifiedName, *localDoctype));
+ Arabica::DOM::Document<std::string>* retVal = new Arabica::DOM::Document<std::string>(privData->nativeObj->createDocument(*localNamespaceURI, *localQualifiedName, *localDoctype));
v8::Handle<v8::Function> retCtor = V8Document::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Document::V8DocumentPrivate* retPrivData = new V8Document::V8DocumentPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h
index f14a39b..5a4c9d3 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ class V8DOMImplementation {
public:
struct V8DOMImplementationPrivate {
V8DOM* dom;
- Arabica::DOM::DOMImplementation<std::string>* arabicaThis;
+ Arabica::DOM::DOMImplementation<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8DOMImplementationPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp
index 2bad2dd..06191ea 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp
@@ -21,14 +21,16 @@ v8::Persistent<v8::FunctionTemplate> V8Document::Tmpl;
v8::Handle<v8::Value> V8Document::doctypeAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
- Arabica::DOM::DocumentType<std::string>* arbaicaRet = new Arabica::DOM::DocumentType<std::string>(privData->arabicaThis->getDoctype());
+
+ if (!privData->nativeObj->getDoctype()) return v8::Undefined();
+ Arabica::DOM::DocumentType<std::string>* arbaicaRet = new Arabica::DOM::DocumentType<std::string>(privData->nativeObj->getDoctype());
v8::Handle<v8::Function> arbaicaRetCtor = V8DocumentType::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8DocumentType::V8DocumentTypePrivate* retPrivData = new V8DocumentType::V8DocumentTypePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8DocumentType::jsDestructor);
@@ -39,14 +41,16 @@ v8::Handle<v8::Value> V8Document::doctypeAttrGetter(v8::Local<v8::String> proper
v8::Handle<v8::Value> V8Document::implementationAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
- Arabica::DOM::DOMImplementation<std::string>* arbaicaRet = new Arabica::DOM::DOMImplementation<std::string>(privData->arabicaThis->getImplementation());
+
+ if (!privData->nativeObj->getImplementation()) return v8::Undefined();
+ Arabica::DOM::DOMImplementation<std::string>* arbaicaRet = new Arabica::DOM::DOMImplementation<std::string>(privData->nativeObj->getImplementation());
v8::Handle<v8::Function> arbaicaRetCtor = V8DOMImplementation::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8DOMImplementation::V8DOMImplementationPrivate* retPrivData = new V8DOMImplementation::V8DOMImplementationPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8DOMImplementation::jsDestructor);
@@ -57,14 +61,16 @@ v8::Handle<v8::Value> V8Document::implementationAttrGetter(v8::Local<v8::String>
v8::Handle<v8::Value> V8Document::documentElementAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
- Arabica::DOM::Element<std::string>* arbaicaRet = new Arabica::DOM::Element<std::string>(privData->arabicaThis->getDocumentElement());
+
+ if (!privData->nativeObj->getDocumentElement()) return v8::Undefined();
+ Arabica::DOM::Element<std::string>* arbaicaRet = new Arabica::DOM::Element<std::string>(privData->nativeObj->getDocumentElement());
v8::Handle<v8::Function> arbaicaRetCtor = V8Element::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Element::jsDestructor);
@@ -79,13 +85,13 @@ v8::Handle<v8::Value> V8Document::createElementCallback(const v8::Arguments& arg
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localTagName(args[0]);
- Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->arabicaThis->createElement(*localTagName));
+ Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElement(*localTagName));
v8::Handle<v8::Function> retCtor = V8Element::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -99,13 +105,13 @@ v8::Handle<v8::Value> V8Document::createDocumentFragmentCallback(const v8::Argum
v8::Local<v8::Object> self = args.Holder();
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
- Arabica::DOM::DocumentFragment<std::string>* retVal = new Arabica::DOM::DocumentFragment<std::string>(privData->arabicaThis->createDocumentFragment());
+ Arabica::DOM::DocumentFragment<std::string>* retVal = new Arabica::DOM::DocumentFragment<std::string>(privData->nativeObj->createDocumentFragment());
v8::Handle<v8::Function> retCtor = V8DocumentFragment::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8DocumentFragment::V8DocumentFragmentPrivate* retPrivData = new V8DocumentFragment::V8DocumentFragmentPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -122,13 +128,13 @@ v8::Handle<v8::Value> V8Document::createTextNodeCallback(const v8::Arguments& ar
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localData(args[0]);
- Arabica::DOM::Text<std::string>* retVal = new Arabica::DOM::Text<std::string>(privData->arabicaThis->createTextNode(*localData));
+ Arabica::DOM::Text<std::string>* retVal = new Arabica::DOM::Text<std::string>(privData->nativeObj->createTextNode(*localData));
v8::Handle<v8::Function> retCtor = V8Text::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Text::V8TextPrivate* retPrivData = new V8Text::V8TextPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -145,13 +151,13 @@ v8::Handle<v8::Value> V8Document::createCommentCallback(const v8::Arguments& arg
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localData(args[0]);
- Arabica::DOM::Comment<std::string>* retVal = new Arabica::DOM::Comment<std::string>(privData->arabicaThis->createComment(*localData));
+ Arabica::DOM::Comment<std::string>* retVal = new Arabica::DOM::Comment<std::string>(privData->nativeObj->createComment(*localData));
v8::Handle<v8::Function> retCtor = V8Comment::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Comment::V8CommentPrivate* retPrivData = new V8Comment::V8CommentPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -168,13 +174,13 @@ v8::Handle<v8::Value> V8Document::createCDATASectionCallback(const v8::Arguments
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localData(args[0]);
- Arabica::DOM::CDATASection<std::string>* retVal = new Arabica::DOM::CDATASection<std::string>(privData->arabicaThis->createCDATASection(*localData));
+ Arabica::DOM::CDATASection<std::string>* retVal = new Arabica::DOM::CDATASection<std::string>(privData->nativeObj->createCDATASection(*localData));
v8::Handle<v8::Function> retCtor = V8CDATASection::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8CDATASection::V8CDATASectionPrivate* retPrivData = new V8CDATASection::V8CDATASectionPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -192,13 +198,13 @@ v8::Handle<v8::Value> V8Document::createProcessingInstructionCallback(const v8::
v8::String::AsciiValue localTarget(args[0]);
v8::String::AsciiValue localData(args[1]);
- Arabica::DOM::ProcessingInstruction<std::string>* retVal = new Arabica::DOM::ProcessingInstruction<std::string>(privData->arabicaThis->createProcessingInstruction(*localTarget, *localData));
+ Arabica::DOM::ProcessingInstruction<std::string>* retVal = new Arabica::DOM::ProcessingInstruction<std::string>(privData->nativeObj->createProcessingInstruction(*localTarget, *localData));
v8::Handle<v8::Function> retCtor = V8ProcessingInstruction::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8ProcessingInstruction::V8ProcessingInstructionPrivate* retPrivData = new V8ProcessingInstruction::V8ProcessingInstructionPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -215,13 +221,13 @@ v8::Handle<v8::Value> V8Document::createAttributeCallback(const v8::Arguments& a
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->arabicaThis->createAttribute(*localName));
+ Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttribute(*localName));
v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -238,13 +244,13 @@ v8::Handle<v8::Value> V8Document::createEntityReferenceCallback(const v8::Argume
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- Arabica::DOM::EntityReference<std::string>* retVal = new Arabica::DOM::EntityReference<std::string>(privData->arabicaThis->createEntityReference(*localName));
+ Arabica::DOM::EntityReference<std::string>* retVal = new Arabica::DOM::EntityReference<std::string>(privData->nativeObj->createEntityReference(*localName));
v8::Handle<v8::Function> retCtor = V8EntityReference::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8EntityReference::V8EntityReferencePrivate* retPrivData = new V8EntityReference::V8EntityReferencePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -261,13 +267,13 @@ v8::Handle<v8::Value> V8Document::getElementsByTagNameCallback(const v8::Argumen
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localTagname(args[0]);
- Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->arabicaThis->getElementsByTagName(*localTagname));
+ Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagName(*localTagname));
v8::Handle<v8::Function> retCtor = V8NodeList::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -284,16 +290,16 @@ v8::Handle<v8::Value> V8Document::importNodeCallback(const v8::Arguments& args)
v8::Local<v8::Object> self = args.Holder();
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* localImportedNode = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Node<std::string>* localImportedNode = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
bool localDeep = args[1]->ToBoolean()->BooleanValue();
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->importNode(*localImportedNode, localDeep));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->importNode(*localImportedNode, localDeep));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -311,13 +317,13 @@ v8::Handle<v8::Value> V8Document::createElementNSCallback(const v8::Arguments& a
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localQualifiedName(args[1]);
- Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->arabicaThis->createElementNS(*localNamespaceURI, *localQualifiedName));
+ Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElementNS(*localNamespaceURI, *localQualifiedName));
v8::Handle<v8::Function> retCtor = V8Element::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -335,13 +341,13 @@ v8::Handle<v8::Value> V8Document::createAttributeNSCallback(const v8::Arguments&
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localQualifiedName(args[1]);
- Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->arabicaThis->createAttributeNS(*localNamespaceURI, *localQualifiedName));
+ Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttributeNS(*localNamespaceURI, *localQualifiedName));
v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -359,13 +365,13 @@ v8::Handle<v8::Value> V8Document::getElementsByTagNameNSCallback(const v8::Argum
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->arabicaThis->getElementsByTagNameNS(*localNamespaceURI, *localLocalName));
+ Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagNameNS(*localNamespaceURI, *localLocalName));
v8::Handle<v8::Function> retCtor = V8NodeList::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -382,13 +388,13 @@ v8::Handle<v8::Value> V8Document::getElementByIdCallback(const v8::Arguments& ar
struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localElementId(args[0]);
- Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->arabicaThis->getElementById(*localElementId));
+ Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->getElementById(*localElementId));
v8::Handle<v8::Function> retCtor = V8Element::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h
index 22d2713..da61876 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8Document {
public:
struct V8DocumentPrivate {
V8DOM* dom;
- Arabica::DOM::Document<std::string>* arabicaThis;
+ Arabica::DOM::Document<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8DocumentPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp
index 2756287..be9b05c 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp
@@ -21,7 +21,7 @@ v8::Handle<v8::Value> V8Document::evaluateCustomCallback(const v8::Arguments& ar
Arabica::DOM::Node<std::string>* localContextNode = V8DOM::toClassPtr<Arabica::DOM::Node<std::string> >(args[1]->ToObject()->GetInternalField(0));
retVal = new XPath::XPathValue<std::string>(privData->dom->xpath->evaluate(*localExpression, *localContextNode));
} else {
- retVal = new XPath::XPathValue<std::string>(privData->dom->xpath->evaluate(*localExpression, *privData->arabicaThis));
+ retVal = new XPath::XPathValue<std::string>(privData->dom->xpath->evaluate(*localExpression, *privData->nativeObj));
}
v8::Handle<v8::Function> retCtor = V8XPathResult::getTmpl()->GetFunction();
@@ -29,7 +29,7 @@ v8::Handle<v8::Value> V8Document::evaluateCustomCallback(const v8::Arguments& ar
V8XPathResult::V8XPathResultPrivate* retPrivData = new V8XPathResult::V8XPathResultPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h
index 2340eb7..62dc58d 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8DocumentFragment {
public:
struct V8DocumentFragmentPrivate {
V8DOM* dom;
- Arabica::DOM::DocumentFragment<std::string>* arabicaThis;
+ Arabica::DOM::DocumentFragment<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8DocumentFragmentPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp
index cd7e2a5..6b9a7b0 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp
@@ -12,20 +12,22 @@ v8::Handle<v8::Value> V8DocumentType::nameAttrGetter(v8::Local<v8::String> prope
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr<V8DocumentTypePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getName().c_str());
+ return v8::String::New(privData->nativeObj->getName().c_str());
}
v8::Handle<v8::Value> V8DocumentType::entitiesAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr<V8DocumentTypePrivate >(self->GetInternalField(0));
- Arabica::DOM::NamedNodeMap<std::string>* arbaicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->arabicaThis->getEntities());
+
+
+ Arabica::DOM::NamedNodeMap<std::string>* arbaicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->nativeObj->getEntities());
v8::Handle<v8::Function> arbaicaRetCtor = V8NamedNodeMap::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8NamedNodeMap::V8NamedNodeMapPrivate* retPrivData = new V8NamedNodeMap::V8NamedNodeMapPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8NamedNodeMap::jsDestructor);
@@ -36,14 +38,16 @@ v8::Handle<v8::Value> V8DocumentType::entitiesAttrGetter(v8::Local<v8::String> p
v8::Handle<v8::Value> V8DocumentType::notationsAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr<V8DocumentTypePrivate >(self->GetInternalField(0));
- Arabica::DOM::NamedNodeMap<std::string>* arbaicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->arabicaThis->getNotations());
+
+
+ Arabica::DOM::NamedNodeMap<std::string>* arbaicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->nativeObj->getNotations());
v8::Handle<v8::Function> arbaicaRetCtor = V8NamedNodeMap::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8NamedNodeMap::V8NamedNodeMapPrivate* retPrivData = new V8NamedNodeMap::V8NamedNodeMapPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8NamedNodeMap::jsDestructor);
@@ -55,21 +59,21 @@ v8::Handle<v8::Value> V8DocumentType::publicIdAttrGetter(v8::Local<v8::String> p
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr<V8DocumentTypePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getPublicId().c_str());
+ return v8::String::New(privData->nativeObj->getPublicId().c_str());
}
v8::Handle<v8::Value> V8DocumentType::systemIdAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr<V8DocumentTypePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getSystemId().c_str());
+ return v8::String::New(privData->nativeObj->getSystemId().c_str());
}
v8::Handle<v8::Value> V8DocumentType::internalSubsetAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr<V8DocumentTypePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getInternalSubset().c_str());
+ return v8::String::New(privData->nativeObj->getInternalSubset().c_str());
}
bool V8DocumentType::hasInstance(v8::Handle<v8::Value> value) {
return getTmpl()->HasInstance(value);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h
index 462cec9..f4d0c15 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8DocumentType {
public:
struct V8DocumentTypePrivate {
V8DOM* dom;
- Arabica::DOM::DocumentType<std::string>* arabicaThis;
+ Arabica::DOM::DocumentType<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8DocumentTypePrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp
index 3c7d7da..680dd5e 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp
@@ -13,7 +13,7 @@ v8::Handle<v8::Value> V8Element::tagNameAttrGetter(v8::Local<v8::String> propert
v8::Local<v8::Object> self = info.Holder();
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getTagName().c_str());
+ return v8::String::New(privData->nativeObj->getTagName().c_str());
}
v8::Handle<v8::Value> V8Element::getAttributeCallback(const v8::Arguments& args) {
if (args.Length() < 1)
@@ -23,7 +23,7 @@ v8::Handle<v8::Value> V8Element::getAttributeCallback(const v8::Arguments& args)
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- std::string retVal = privData->arabicaThis->getAttribute(*localName);
+ std::string retVal = privData->nativeObj->getAttribute(*localName);
return v8::String::New(retVal.c_str());
}
@@ -37,7 +37,7 @@ v8::Handle<v8::Value> V8Element::setAttributeCallback(const v8::Arguments& args)
v8::String::AsciiValue localName(args[0]);
v8::String::AsciiValue localValue(args[1]);
- privData->arabicaThis->setAttribute(*localName, *localValue);
+ privData->nativeObj->setAttribute(*localName, *localValue);
return v8::Undefined();
}
@@ -50,7 +50,7 @@ v8::Handle<v8::Value> V8Element::removeAttributeCallback(const v8::Arguments& ar
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- privData->arabicaThis->removeAttribute(*localName);
+ privData->nativeObj->removeAttribute(*localName);
return v8::Undefined();
}
@@ -63,13 +63,13 @@ v8::Handle<v8::Value> V8Element::getAttributeNodeCallback(const v8::Arguments& a
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->arabicaThis->getAttributeNode(*localName));
+ Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->getAttributeNode(*localName));
v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -86,15 +86,15 @@ v8::Handle<v8::Value> V8Element::setAttributeNodeCallback(const v8::Arguments& a
v8::Local<v8::Object> self = args.Holder();
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
- Arabica::DOM::Attr<std::string>* localNewAttr = V8DOM::toClassPtr<V8Attr::V8AttrPrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Attr<std::string>* localNewAttr = V8DOM::toClassPtr<V8Attr::V8AttrPrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->arabicaThis->setAttributeNode(*localNewAttr));
+ Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->setAttributeNode(*localNewAttr));
v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -111,15 +111,15 @@ v8::Handle<v8::Value> V8Element::removeAttributeNodeCallback(const v8::Arguments
v8::Local<v8::Object> self = args.Holder();
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
- Arabica::DOM::Attr<std::string>* localOldAttr = V8DOM::toClassPtr<V8Attr::V8AttrPrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Attr<std::string>* localOldAttr = V8DOM::toClassPtr<V8Attr::V8AttrPrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->arabicaThis->removeAttributeNode(*localOldAttr));
+ Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->removeAttributeNode(*localOldAttr));
v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -136,13 +136,13 @@ v8::Handle<v8::Value> V8Element::getElementsByTagNameCallback(const v8::Argument
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->arabicaThis->getElementsByTagName(*localName));
+ Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagName(*localName));
v8::Handle<v8::Function> retCtor = V8NodeList::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -160,7 +160,7 @@ v8::Handle<v8::Value> V8Element::getAttributeNSCallback(const v8::Arguments& arg
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- std::string retVal = privData->arabicaThis->getAttributeNS(*localNamespaceURI, *localLocalName);
+ std::string retVal = privData->nativeObj->getAttributeNS(*localNamespaceURI, *localLocalName);
return v8::String::New(retVal.c_str());
}
@@ -175,7 +175,7 @@ v8::Handle<v8::Value> V8Element::setAttributeNSCallback(const v8::Arguments& arg
v8::String::AsciiValue localQualifiedName(args[1]);
v8::String::AsciiValue localValue(args[2]);
- privData->arabicaThis->setAttributeNS(*localNamespaceURI, *localQualifiedName, *localValue);
+ privData->nativeObj->setAttributeNS(*localNamespaceURI, *localQualifiedName, *localValue);
return v8::Undefined();
}
@@ -189,7 +189,7 @@ v8::Handle<v8::Value> V8Element::removeAttributeNSCallback(const v8::Arguments&
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- privData->arabicaThis->removeAttributeNS(*localNamespaceURI, *localLocalName);
+ privData->nativeObj->removeAttributeNS(*localNamespaceURI, *localLocalName);
return v8::Undefined();
}
@@ -203,13 +203,13 @@ v8::Handle<v8::Value> V8Element::getAttributeNodeNSCallback(const v8::Arguments&
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->arabicaThis->getAttributeNodeNS(*localNamespaceURI, *localLocalName));
+ Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->getAttributeNodeNS(*localNamespaceURI, *localLocalName));
v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -226,15 +226,15 @@ v8::Handle<v8::Value> V8Element::setAttributeNodeNSCallback(const v8::Arguments&
v8::Local<v8::Object> self = args.Holder();
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
- Arabica::DOM::Attr<std::string>* localNewAttr = V8DOM::toClassPtr<V8Attr::V8AttrPrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Attr<std::string>* localNewAttr = V8DOM::toClassPtr<V8Attr::V8AttrPrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->arabicaThis->setAttributeNodeNS(*localNewAttr));
+ Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->setAttributeNodeNS(*localNewAttr));
v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -252,13 +252,13 @@ v8::Handle<v8::Value> V8Element::getElementsByTagNameNSCallback(const v8::Argume
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->arabicaThis->getElementsByTagNameNS(*localNamespaceURI, *localLocalName));
+ Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagNameNS(*localNamespaceURI, *localLocalName));
v8::Handle<v8::Function> retCtor = V8NodeList::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -275,7 +275,7 @@ v8::Handle<v8::Value> V8Element::hasAttributeCallback(const v8::Arguments& args)
struct V8ElementPrivate* privData = V8DOM::toClassPtr<V8ElementPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- bool retVal = privData->arabicaThis->hasAttribute(*localName);
+ bool retVal = privData->nativeObj->hasAttribute(*localName);
return v8::Boolean::New(retVal);
}
@@ -289,7 +289,7 @@ v8::Handle<v8::Value> V8Element::hasAttributeNSCallback(const v8::Arguments& arg
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- bool retVal = privData->arabicaThis->hasAttributeNS(*localNamespaceURI, *localLocalName);
+ bool retVal = privData->nativeObj->hasAttributeNS(*localNamespaceURI, *localLocalName);
return v8::Boolean::New(retVal);
}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h
index 5a824b3..338c249 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8Element {
public:
struct V8ElementPrivate {
V8DOM* dom;
- Arabica::DOM::Element<std::string>* arabicaThis;
+ Arabica::DOM::Element<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8ElementPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp
index 8bdd57c..f3ce21d 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp
@@ -11,21 +11,21 @@ v8::Handle<v8::Value> V8Entity::publicIdAttrGetter(v8::Local<v8::String> propert
v8::Local<v8::Object> self = info.Holder();
struct V8EntityPrivate* privData = V8DOM::toClassPtr<V8EntityPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getPublicId().c_str());
+ return v8::String::New(privData->nativeObj->getPublicId().c_str());
}
v8::Handle<v8::Value> V8Entity::systemIdAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8EntityPrivate* privData = V8DOM::toClassPtr<V8EntityPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getSystemId().c_str());
+ return v8::String::New(privData->nativeObj->getSystemId().c_str());
}
v8::Handle<v8::Value> V8Entity::notationNameAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8EntityPrivate* privData = V8DOM::toClassPtr<V8EntityPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getNotationName().c_str());
+ return v8::String::New(privData->nativeObj->getNotationName().c_str());
}
bool V8Entity::hasInstance(v8::Handle<v8::Value> value) {
return getTmpl()->HasInstance(value);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h
index 6c22e3a..c8e0eaf 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8Entity {
public:
struct V8EntityPrivate {
V8DOM* dom;
- Arabica::DOM::Entity<std::string>* arabicaThis;
+ Arabica::DOM::Entity<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8EntityPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h
index d99c7ab..85cc7cc 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8EntityReference {
public:
struct V8EntityReferencePrivate {
V8DOM* dom;
- Arabica::DOM::EntityReference<std::string>* arabicaThis;
+ Arabica::DOM::EntityReference<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8EntityReferencePrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp
index 4608ea1..037d651 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp
@@ -11,7 +11,7 @@ v8::Handle<v8::Value> V8NamedNodeMap::lengthAttrGetter(v8::Local<v8::String> pro
v8::Local<v8::Object> self = info.Holder();
struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr<V8NamedNodeMapPrivate >(self->GetInternalField(0));
- return v8::Integer::New(privData->arabicaThis->getLength());
+ return v8::Integer::New(privData->nativeObj->getLength());
}
v8::Handle<v8::Value> V8NamedNodeMap::getNamedItemCallback(const v8::Arguments& args) {
if (args.Length() < 1)
@@ -21,13 +21,13 @@ v8::Handle<v8::Value> V8NamedNodeMap::getNamedItemCallback(const v8::Arguments&
struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr<V8NamedNodeMapPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->getNamedItem(*localName));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->getNamedItem(*localName));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -44,15 +44,15 @@ v8::Handle<v8::Value> V8NamedNodeMap::setNamedItemCallback(const v8::Arguments&
v8::Local<v8::Object> self = args.Holder();
struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr<V8NamedNodeMapPrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* localArg = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Node<std::string>* localArg = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->setNamedItem(*localArg));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->setNamedItem(*localArg));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -69,13 +69,13 @@ v8::Handle<v8::Value> V8NamedNodeMap::removeNamedItemCallback(const v8::Argument
struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr<V8NamedNodeMapPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localName(args[0]);
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->removeNamedItem(*localName));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->removeNamedItem(*localName));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -92,13 +92,13 @@ v8::Handle<v8::Value> V8NamedNodeMap::itemCallback(const v8::Arguments& args) {
struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr<V8NamedNodeMapPrivate >(self->GetInternalField(0));
unsigned long localIndex = args[0]->ToNumber()->Uint32Value();
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->item(localIndex));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->item(localIndex));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -116,13 +116,13 @@ v8::Handle<v8::Value> V8NamedNodeMap::getNamedItemNSCallback(const v8::Arguments
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->getNamedItemNS(*localNamespaceURI, *localLocalName));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->getNamedItemNS(*localNamespaceURI, *localLocalName));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -139,15 +139,15 @@ v8::Handle<v8::Value> V8NamedNodeMap::setNamedItemNSCallback(const v8::Arguments
v8::Local<v8::Object> self = args.Holder();
struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr<V8NamedNodeMapPrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* localArg = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Node<std::string>* localArg = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->setNamedItemNS(*localArg));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->setNamedItemNS(*localArg));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -165,13 +165,13 @@ v8::Handle<v8::Value> V8NamedNodeMap::removeNamedItemNSCallback(const v8::Argume
v8::String::AsciiValue localNamespaceURI(args[0]);
v8::String::AsciiValue localLocalName(args[1]);
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->removeNamedItemNS(*localNamespaceURI, *localLocalName));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->removeNamedItemNS(*localNamespaceURI, *localLocalName));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h
index 52e6c54..b8bc873 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ class V8NamedNodeMap {
public:
struct V8NamedNodeMapPrivate {
V8DOM* dom;
- Arabica::DOM::NamedNodeMap<std::string>* arabicaThis;
+ Arabica::DOM::NamedNodeMap<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8NamedNodeMapPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp
index 52ff3ec..b77f38e 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp
@@ -13,41 +13,43 @@ v8::Handle<v8::Value> V8Node::nodeNameAttrGetter(v8::Local<v8::String> property,
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getNodeName().c_str());
+ return v8::String::New(privData->nativeObj->getNodeName().c_str());
}
v8::Handle<v8::Value> V8Node::nodeValueAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getNodeValue().c_str());
+ return v8::String::New(privData->nativeObj->getNodeValue().c_str());
}
void V8Node::nodeValueAttrSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
v8::String::AsciiValue localNodeValue(value);
- privData->arabicaThis->setNodeValue(*localNodeValue);
+ privData->nativeObj->setNodeValue(*localNodeValue);
}
v8::Handle<v8::Value> V8Node::nodeTypeAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- return v8::Integer::New(privData->arabicaThis->getNodeType());
+ return v8::Integer::New(privData->nativeObj->getNodeType());
}
v8::Handle<v8::Value> V8Node::parentNodeAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->arabicaThis->getParentNode());
+
+ if (!privData->nativeObj->getParentNode()) return v8::Undefined();
+ Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getParentNode());
v8::Handle<v8::Function> arbaicaRetCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor);
@@ -58,14 +60,16 @@ v8::Handle<v8::Value> V8Node::parentNodeAttrGetter(v8::Local<v8::String> propert
v8::Handle<v8::Value> V8Node::childNodesAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::NodeList<std::string>* arbaicaRet = new Arabica::DOM::NodeList<std::string>(privData->arabicaThis->getChildNodes());
+
+
+ Arabica::DOM::NodeList<std::string>* arbaicaRet = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getChildNodes());
v8::Handle<v8::Function> arbaicaRetCtor = V8NodeList::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8NodeList::jsDestructor);
@@ -76,14 +80,16 @@ v8::Handle<v8::Value> V8Node::childNodesAttrGetter(v8::Local<v8::String> propert
v8::Handle<v8::Value> V8Node::firstChildAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->arabicaThis->getFirstChild());
+
+ if (!privData->nativeObj->getFirstChild()) return v8::Undefined();
+ Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getFirstChild());
v8::Handle<v8::Function> arbaicaRetCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor);
@@ -94,14 +100,16 @@ v8::Handle<v8::Value> V8Node::firstChildAttrGetter(v8::Local<v8::String> propert
v8::Handle<v8::Value> V8Node::lastChildAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->arabicaThis->getLastChild());
+
+ if (!privData->nativeObj->getLastChild()) return v8::Undefined();
+ Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getLastChild());
v8::Handle<v8::Function> arbaicaRetCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor);
@@ -112,14 +120,16 @@ v8::Handle<v8::Value> V8Node::lastChildAttrGetter(v8::Local<v8::String> property
v8::Handle<v8::Value> V8Node::previousSiblingAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->arabicaThis->getPreviousSibling());
+
+ if (!privData->nativeObj->getPreviousSibling()) return v8::Undefined();
+ Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getPreviousSibling());
v8::Handle<v8::Function> arbaicaRetCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor);
@@ -130,14 +140,16 @@ v8::Handle<v8::Value> V8Node::previousSiblingAttrGetter(v8::Local<v8::String> pr
v8::Handle<v8::Value> V8Node::nextSiblingAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->arabicaThis->getNextSibling());
+
+ if (!privData->nativeObj->getNextSibling()) return v8::Undefined();
+ Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getNextSibling());
v8::Handle<v8::Function> arbaicaRetCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor);
@@ -148,14 +160,16 @@ v8::Handle<v8::Value> V8Node::nextSiblingAttrGetter(v8::Local<v8::String> proper
v8::Handle<v8::Value> V8Node::attributesAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::NamedNodeMap<std::string>* arbaicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->arabicaThis->getAttributes());
+
+
+ Arabica::DOM::NamedNodeMap<std::string>* arbaicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->nativeObj->getAttributes());
v8::Handle<v8::Function> arbaicaRetCtor = V8NamedNodeMap::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8NamedNodeMap::V8NamedNodeMapPrivate* retPrivData = new V8NamedNodeMap::V8NamedNodeMapPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8NamedNodeMap::jsDestructor);
@@ -166,14 +180,16 @@ v8::Handle<v8::Value> V8Node::attributesAttrGetter(v8::Local<v8::String> propert
v8::Handle<v8::Value> V8Node::ownerDocumentAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Document<std::string>* arbaicaRet = new Arabica::DOM::Document<std::string>(privData->arabicaThis->getOwnerDocument());
+
+ if (!privData->nativeObj->getOwnerDocument()) return v8::Undefined();
+ Arabica::DOM::Document<std::string>* arbaicaRet = new Arabica::DOM::Document<std::string>(privData->nativeObj->getOwnerDocument());
v8::Handle<v8::Function> arbaicaRetCtor = V8Document::getTmpl()->GetFunction();
v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
struct V8Document::V8DocumentPrivate* retPrivData = new V8Document::V8DocumentPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = arbaicaRet;
+ retPrivData->nativeObj = arbaicaRet;
arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
arbaicaRetObj.MakeWeak(0, V8Document::jsDestructor);
@@ -185,28 +201,28 @@ v8::Handle<v8::Value> V8Node::namespaceURIAttrGetter(v8::Local<v8::String> prope
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getNamespaceURI().c_str());
+ return v8::String::New(privData->nativeObj->getNamespaceURI().c_str());
}
v8::Handle<v8::Value> V8Node::prefixAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getPrefix().c_str());
+ return v8::String::New(privData->nativeObj->getPrefix().c_str());
}
void V8Node::prefixAttrSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
v8::String::AsciiValue localPrefix(value);
- privData->arabicaThis->setPrefix(*localPrefix);
+ privData->nativeObj->setPrefix(*localPrefix);
}
v8::Handle<v8::Value> V8Node::localNameAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getLocalName().c_str());
+ return v8::String::New(privData->nativeObj->getLocalName().c_str());
}
v8::Handle<v8::Value> V8Node::insertBeforeCallback(const v8::Arguments& args) {
if (args.Length() < 2)
@@ -216,16 +232,16 @@ v8::Handle<v8::Value> V8Node::insertBeforeCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* localNewChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
- Arabica::DOM::Node<std::string>* localRefChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[1]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Node<std::string>* localNewChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
+ Arabica::DOM::Node<std::string>* localRefChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[1]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->insertBefore(*localNewChild, *localRefChild));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->insertBefore(*localNewChild, *localRefChild));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -242,16 +258,16 @@ v8::Handle<v8::Value> V8Node::replaceChildCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* localNewChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
- Arabica::DOM::Node<std::string>* localOldChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[1]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Node<std::string>* localNewChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
+ Arabica::DOM::Node<std::string>* localOldChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[1]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->replaceChild(*localNewChild, *localOldChild));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->replaceChild(*localNewChild, *localOldChild));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -268,15 +284,15 @@ v8::Handle<v8::Value> V8Node::removeChildCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* localOldChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Node<std::string>* localOldChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->removeChild(*localOldChild));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->removeChild(*localOldChild));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -293,15 +309,15 @@ v8::Handle<v8::Value> V8Node::appendChildCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* localNewChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->arabicaThis;
+ Arabica::DOM::Node<std::string>* localNewChild = V8DOM::toClassPtr<V8Node::V8NodePrivate >(args[0]->ToObject()->GetInternalField(0))->nativeObj;
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->appendChild(*localNewChild));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->appendChild(*localNewChild));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -315,7 +331,7 @@ v8::Handle<v8::Value> V8Node::hasChildNodesCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- bool retVal = privData->arabicaThis->hasChildNodes();
+ bool retVal = privData->nativeObj->hasChildNodes();
return v8::Boolean::New(retVal);
}
@@ -328,13 +344,13 @@ v8::Handle<v8::Value> V8Node::cloneNodeCallback(const v8::Arguments& args) {
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
bool localDeep = args[0]->ToBoolean()->BooleanValue();
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->cloneNode(localDeep));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->cloneNode(localDeep));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -348,7 +364,7 @@ v8::Handle<v8::Value> V8Node::normalizeCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- privData->arabicaThis->normalize();
+ privData->nativeObj->normalize();
return v8::Undefined();
}
@@ -362,7 +378,7 @@ v8::Handle<v8::Value> V8Node::isSupportedCallback(const v8::Arguments& args) {
v8::String::AsciiValue localFeature(args[0]);
v8::String::AsciiValue localVersion(args[1]);
- bool retVal = privData->arabicaThis->isSupported(*localFeature, *localVersion);
+ bool retVal = privData->nativeObj->isSupported(*localFeature, *localVersion);
return v8::Boolean::New(retVal);
}
@@ -372,7 +388,7 @@ v8::Handle<v8::Value> V8Node::hasAttributesCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodePrivate* privData = V8DOM::toClassPtr<V8NodePrivate >(self->GetInternalField(0));
- bool retVal = privData->arabicaThis->hasAttributes();
+ bool retVal = privData->nativeObj->hasAttributes();
return v8::Boolean::New(retVal);
}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h
index ee14dc9..a15a676 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ class V8Node {
public:
struct V8NodePrivate {
V8DOM* dom;
- Arabica::DOM::Node<std::string>* arabicaThis;
+ Arabica::DOM::Node<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8NodePrivate);
@@ -124,30 +124,30 @@ public:
prototype->Set(v8::String::NewSymbol("hasAttributes"),
v8::FunctionTemplate::New(V8Node::hasAttributesCallback, v8::Undefined()), static_cast<v8::PropertyAttribute>(v8::DontDelete));
- tmpl->Set(v8::String::NewSymbol("ELEMENT_NODE"), v8::Integer::New(1), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("ELEMENT_NODE"), v8::Integer::New(1), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("ATTRIBUTE_NODE"), v8::Integer::New(2), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("ATTRIBUTE_NODE"), v8::Integer::New(2), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("TEXT_NODE"), v8::Integer::New(3), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("TEXT_NODE"), v8::Integer::New(3), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("CDATA_SECTION_NODE"), v8::Integer::New(4), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("CDATA_SECTION_NODE"), v8::Integer::New(4), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("ENTITY_REFERENCE_NODE"), v8::Integer::New(5), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("ENTITY_REFERENCE_NODE"), v8::Integer::New(5), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("ENTITY_NODE"), v8::Integer::New(6), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("ENTITY_NODE"), v8::Integer::New(6), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("PROCESSING_INSTRUCTION_NODE"), v8::Integer::New(7), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("PROCESSING_INSTRUCTION_NODE"), v8::Integer::New(7), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("COMMENT_NODE"), v8::Integer::New(8), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("COMMENT_NODE"), v8::Integer::New(8), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("DOCUMENT_NODE"), v8::Integer::New(9), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("DOCUMENT_NODE"), v8::Integer::New(9), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("DOCUMENT_TYPE_NODE"), v8::Integer::New(10), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("DOCUMENT_TYPE_NODE"), v8::Integer::New(10), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("DOCUMENT_FRAGMENT_NODE"), v8::Integer::New(11), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("DOCUMENT_FRAGMENT_NODE"), v8::Integer::New(11), v8::ReadOnly);
- tmpl->Set(v8::String::NewSymbol("NOTATION_NODE"), v8::Integer::New(12), v8::ReadOnly);
- prototype->Set(v8::String::NewSymbol("NOTATION_NODE"), v8::Integer::New(12), v8::ReadOnly);
+ tmpl->Set(v8::String::NewSymbol("ELEMENT_NODE"), v8::Integer::New(1), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("ELEMENT_NODE"), v8::Integer::New(1), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("ATTRIBUTE_NODE"), v8::Integer::New(2), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("ATTRIBUTE_NODE"), v8::Integer::New(2), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("TEXT_NODE"), v8::Integer::New(3), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("TEXT_NODE"), v8::Integer::New(3), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("CDATA_SECTION_NODE"), v8::Integer::New(4), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("CDATA_SECTION_NODE"), v8::Integer::New(4), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("ENTITY_REFERENCE_NODE"), v8::Integer::New(5), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("ENTITY_REFERENCE_NODE"), v8::Integer::New(5), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("ENTITY_NODE"), v8::Integer::New(6), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("ENTITY_NODE"), v8::Integer::New(6), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("PROCESSING_INSTRUCTION_NODE"), v8::Integer::New(7), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("PROCESSING_INSTRUCTION_NODE"), v8::Integer::New(7), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("COMMENT_NODE"), v8::Integer::New(8), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("COMMENT_NODE"), v8::Integer::New(8), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("DOCUMENT_NODE"), v8::Integer::New(9), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("DOCUMENT_NODE"), v8::Integer::New(9), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("DOCUMENT_TYPE_NODE"), v8::Integer::New(10), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("DOCUMENT_TYPE_NODE"), v8::Integer::New(10), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("DOCUMENT_FRAGMENT_NODE"), v8::Integer::New(11), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("DOCUMENT_FRAGMENT_NODE"), v8::Integer::New(11), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("NOTATION_NODE"), v8::Integer::New(12), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("NOTATION_NODE"), v8::Integer::New(12), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
Tmpl = v8::Persistent<v8::FunctionTemplate>::New(tmpl);
}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp
index 1f6b368..bee706e 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp
@@ -11,7 +11,7 @@ v8::Handle<v8::Value> V8NodeList::lengthAttrGetter(v8::Local<v8::String> propert
v8::Local<v8::Object> self = info.Holder();
struct V8NodeListPrivate* privData = V8DOM::toClassPtr<V8NodeListPrivate >(self->GetInternalField(0));
- return v8::Integer::New(privData->arabicaThis->getLength());
+ return v8::Integer::New(privData->nativeObj->getLength());
}
v8::Handle<v8::Value> V8NodeList::itemCallback(const v8::Arguments& args) {
if (args.Length() < 1)
@@ -21,13 +21,13 @@ v8::Handle<v8::Value> V8NodeList::itemCallback(const v8::Arguments& args) {
struct V8NodeListPrivate* privData = V8DOM::toClassPtr<V8NodeListPrivate >(self->GetInternalField(0));
unsigned long localIndex = args[0]->ToNumber()->Uint32Value();
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->item(localIndex));
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->item(localIndex));
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h
index fefc084..771d82c 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ class V8NodeList {
public:
struct V8NodeListPrivate {
V8DOM* dom;
- Arabica::DOM::NodeList<std::string>* arabicaThis;
+ Arabica::DOM::NodeList<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8NodeListPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp
index 2b051f1..fade729 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp
@@ -10,21 +10,21 @@ v8::Handle<v8::Value> V8NodeSet::sizeAttrGetter(v8::Local<v8::String> property,
v8::Local<v8::Object> self = info.Holder();
struct V8NodeSetPrivate* privData = V8DOM::toClassPtr<V8NodeSetPrivate >(self->GetInternalField(0));
- return v8::Integer::New(privData->arabicaThis->size());
+ return v8::Integer::New(privData->nativeObj->size());
}
v8::Handle<v8::Value> V8NodeSet::emptyAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NodeSetPrivate* privData = V8DOM::toClassPtr<V8NodeSetPrivate >(self->GetInternalField(0));
- return v8::Boolean::New(privData->arabicaThis->empty());
+ return v8::Boolean::New(privData->nativeObj->empty());
}
v8::Handle<v8::Value> V8NodeSet::toDocumentOrderCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8NodeSetPrivate* privData = V8DOM::toClassPtr<V8NodeSetPrivate >(self->GetInternalField(0));
- privData->arabicaThis->to_document_order();
+ privData->nativeObj->to_document_order();
return v8::Undefined();
}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h
index 583c1b9..294d851 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ class V8NodeSet {
public:
struct V8NodeSetPrivate {
V8DOM* dom;
- Arabica::XPath::NodeSet<std::string>* arabicaThis;
+ Arabica::XPath::NodeSet<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8NodeSetPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp
index 61f5947..ba84b75 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp
@@ -9,17 +9,17 @@ v8::Handle<v8::Value> V8NodeSet::indexedPropertyCustomGetter(uint32_t index, con
v8::Local<v8::Object> self = info.Holder();
V8NodeSetPrivate* privData = V8DOM::toClassPtr<V8NodeSetPrivate >(self->GetInternalField(0));
- if (privData->arabicaThis->size() >= index) {
- switch((*privData->arabicaThis)[index].getNodeType()) {
+ if (privData->nativeObj->size() >= index) {
+ switch((*privData->nativeObj)[index].getNodeType()) {
case Node_base::ELEMENT_NODE: {
- Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>((*privData->arabicaThis)[index]);
+ Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>((*privData->nativeObj)[index]);
v8::Handle<v8::Function> retCtor = V8Element::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -27,14 +27,14 @@ v8::Handle<v8::Value> V8NodeSet::indexedPropertyCustomGetter(uint32_t index, con
return retObj;
}
default: {
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>((*privData->arabicaThis)[index]);
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>((*privData->nativeObj)[index]);
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp
index e210491..129563d 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp
@@ -11,14 +11,14 @@ v8::Handle<v8::Value> V8Notation::publicIdAttrGetter(v8::Local<v8::String> prope
v8::Local<v8::Object> self = info.Holder();
struct V8NotationPrivate* privData = V8DOM::toClassPtr<V8NotationPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getPublicId().c_str());
+ return v8::String::New(privData->nativeObj->getPublicId().c_str());
}
v8::Handle<v8::Value> V8Notation::systemIdAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8NotationPrivate* privData = V8DOM::toClassPtr<V8NotationPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getSystemId().c_str());
+ return v8::String::New(privData->nativeObj->getSystemId().c_str());
}
bool V8Notation::hasInstance(v8::Handle<v8::Value> value) {
return getTmpl()->HasInstance(value);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h
index f29d1fe..ba90056 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8Notation {
public:
struct V8NotationPrivate {
V8DOM* dom;
- Arabica::DOM::Notation<std::string>* arabicaThis;
+ Arabica::DOM::Notation<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8NotationPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp
index c299d76..c6d2b28 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp
@@ -11,21 +11,21 @@ v8::Handle<v8::Value> V8ProcessingInstruction::targetAttrGetter(v8::Local<v8::St
v8::Local<v8::Object> self = info.Holder();
struct V8ProcessingInstructionPrivate* privData = V8DOM::toClassPtr<V8ProcessingInstructionPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getTarget().c_str());
+ return v8::String::New(privData->nativeObj->getTarget().c_str());
}
v8::Handle<v8::Value> V8ProcessingInstruction::dataAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8ProcessingInstructionPrivate* privData = V8DOM::toClassPtr<V8ProcessingInstructionPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->getData().c_str());
+ return v8::String::New(privData->nativeObj->getData().c_str());
}
void V8ProcessingInstruction::dataAttrSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8ProcessingInstructionPrivate* privData = V8DOM::toClassPtr<V8ProcessingInstructionPrivate >(self->GetInternalField(0));
v8::String::AsciiValue localData(value);
- privData->arabicaThis->setData(*localData);
+ privData->nativeObj->setData(*localData);
}
bool V8ProcessingInstruction::hasInstance(v8::Handle<v8::Value> value) {
return getTmpl()->HasInstance(value);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h
index 61eaa2e..995d066 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8ProcessingInstruction {
public:
struct V8ProcessingInstructionPrivate {
V8DOM* dom;
- Arabica::DOM::ProcessingInstruction<std::string>* arabicaThis;
+ Arabica::DOM::ProcessingInstruction<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8ProcessingInstructionPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp
new file mode 100644
index 0000000..ed6133a
--- /dev/null
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp
@@ -0,0 +1,76 @@
+#include "V8Node.h"
+#include "V8SCXMLEvent.h"
+
+namespace Arabica {
+namespace DOM {
+
+v8::Persistent<v8::FunctionTemplate> V8SCXMLEvent::Tmpl;
+
+
+v8::Handle<v8::Value> V8SCXMLEvent::typeAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
+ v8::Local<v8::Object> self = info.Holder();
+ struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr<V8SCXMLEventPrivate >(self->GetInternalField(0));
+
+ return v8::Integer::New(privData->nativeObj->type);
+}
+
+v8::Handle<v8::Value> V8SCXMLEvent::nameAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
+ v8::Local<v8::Object> self = info.Holder();
+ struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr<V8SCXMLEventPrivate >(self->GetInternalField(0));
+
+ return v8::String::New(privData->nativeObj->name.c_str());
+}
+
+v8::Handle<v8::Value> V8SCXMLEvent::originAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
+ v8::Local<v8::Object> self = info.Holder();
+ struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr<V8SCXMLEventPrivate >(self->GetInternalField(0));
+
+ return v8::String::New(privData->nativeObj->origin.c_str());
+}
+
+v8::Handle<v8::Value> V8SCXMLEvent::origintypeAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
+ v8::Local<v8::Object> self = info.Holder();
+ struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr<V8SCXMLEventPrivate >(self->GetInternalField(0));
+
+ return v8::String::New(privData->nativeObj->origintype.c_str());
+}
+
+v8::Handle<v8::Value> V8SCXMLEvent::domAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
+ v8::Local<v8::Object> self = info.Holder();
+ struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr<V8SCXMLEventPrivate >(self->GetInternalField(0));
+
+ if (!privData->nativeObj->dom) return v8::Undefined();
+ Arabica::DOM::Node<std::string>* arbaicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->dom);
+
+ v8::Handle<v8::Function> arbaicaRetCtor = V8Node::getTmpl()->GetFunction();
+ v8::Persistent<v8::Object> arbaicaRetObj = v8::Persistent<v8::Object>::New(arbaicaRetCtor->NewInstance());
+
+ struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
+ retPrivData->dom = privData->dom;
+ retPrivData->nativeObj = arbaicaRet;
+
+ arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
+ arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor);
+ return arbaicaRetObj;
+
+}
+
+v8::Handle<v8::Value> V8SCXMLEvent::sendidAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
+ v8::Local<v8::Object> self = info.Holder();
+ struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr<V8SCXMLEventPrivate >(self->GetInternalField(0));
+
+ return v8::String::New(privData->nativeObj->sendid.c_str());
+}
+
+v8::Handle<v8::Value> V8SCXMLEvent::invokeidAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
+ v8::Local<v8::Object> self = info.Holder();
+ struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr<V8SCXMLEventPrivate >(self->GetInternalField(0));
+
+ return v8::String::New(privData->nativeObj->invokeid.c_str());
+}
+bool V8SCXMLEvent::hasInstance(v8::Handle<v8::Value> value) {
+ return getTmpl()->HasInstance(value);
+}
+
+}
+}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h
new file mode 100644
index 0000000..26ac8b6
--- /dev/null
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h
@@ -0,0 +1,95 @@
+/*
+ This file is part of the Wrapper open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef V8SCXMLEvent_h
+#define V8SCXMLEvent_h
+
+#include "DOM/Node.hpp"
+#include "uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOM.h"
+#include <v8.h>
+
+namespace Arabica {
+namespace DOM {
+
+class V8SCXMLEvent {
+public:
+ struct V8SCXMLEventPrivate {
+ V8DOM* dom;
+ uscxml::Event* nativeObj;
+ };
+
+ V8_DESTRUCTOR_KEEP_WRAPPED(V8SCXMLEventPrivate);
+ static bool hasInstance(v8::Handle<v8::Value>);
+
+
+ static v8::Handle<v8::Value> typeAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
+ static v8::Handle<v8::Value> nameAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
+ static v8::Handle<v8::Value> originAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
+ static v8::Handle<v8::Value> origintypeAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
+ static v8::Handle<v8::Value> domAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
+ static v8::Handle<v8::Value> sendidAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
+ static v8::Handle<v8::Value> invokeidAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
+
+ static v8::Persistent<v8::FunctionTemplate> Tmpl;
+ static v8::Handle<v8::FunctionTemplate> getTmpl() {
+ if (Tmpl.IsEmpty()) {
+ v8::Handle<v8::FunctionTemplate> tmpl = v8::FunctionTemplate::New();
+ tmpl->SetClassName(v8::String::New("SCXMLEvent"));
+ tmpl->ReadOnlyPrototype();
+
+ v8::Local<v8::ObjectTemplate> instance = tmpl->InstanceTemplate();
+ v8::Local<v8::ObjectTemplate> prototype = tmpl->PrototypeTemplate();
+ instance->SetInternalFieldCount(1);
+
+ instance->SetAccessor(v8::String::NewSymbol("type"), V8SCXMLEvent::typeAttrGetter, 0,
+ v8::External::New(0), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None));
+ instance->SetAccessor(v8::String::NewSymbol("name"), V8SCXMLEvent::nameAttrGetter, 0,
+ v8::External::New(0), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None));
+ instance->SetAccessor(v8::String::NewSymbol("origin"), V8SCXMLEvent::originAttrGetter, 0,
+ v8::External::New(0), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None));
+ instance->SetAccessor(v8::String::NewSymbol("origintype"), V8SCXMLEvent::origintypeAttrGetter, 0,
+ v8::External::New(0), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None));
+ instance->SetAccessor(v8::String::NewSymbol("dom"), V8SCXMLEvent::domAttrGetter, 0,
+ v8::External::New(0), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None));
+ instance->SetAccessor(v8::String::NewSymbol("sendid"), V8SCXMLEvent::sendidAttrGetter, 0,
+ v8::External::New(0), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None));
+ instance->SetAccessor(v8::String::NewSymbol("invokeid"), V8SCXMLEvent::invokeidAttrGetter, 0,
+ v8::External::New(0), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None));
+
+
+ tmpl->Set(v8::String::NewSymbol("INTERNAL"), v8::Integer::New(1), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("INTERNAL"), v8::Integer::New(1), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("EXTERNAL"), v8::Integer::New(2), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("EXTERNAL"), v8::Integer::New(2), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ tmpl->Set(v8::String::NewSymbol("PLATFORM"), v8::Integer::New(3), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+ prototype->Set(v8::String::NewSymbol("PLATFORM"), v8::Integer::New(3), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum));
+
+ Tmpl = v8::Persistent<v8::FunctionTemplate>::New(tmpl);
+ }
+ return Tmpl;
+ }
+
+
+};
+
+}
+}
+
+#endif // V8SCXMLEvent_h
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp
index fd9f6a3..42b298a 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp
@@ -14,13 +14,13 @@ v8::Handle<v8::Value> V8Text::splitTextCallback(const v8::Arguments& args) {
struct V8TextPrivate* privData = V8DOM::toClassPtr<V8TextPrivate >(self->GetInternalField(0));
unsigned long localOffset = args[0]->ToNumber()->Uint32Value();
- Arabica::DOM::Text<std::string>* retVal = new Arabica::DOM::Text<std::string>(privData->arabicaThis->splitText(localOffset));
+ Arabica::DOM::Text<std::string>* retVal = new Arabica::DOM::Text<std::string>(privData->nativeObj->splitText(localOffset));
v8::Handle<v8::Function> retCtor = V8Text::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Text::V8TextPrivate* retPrivData = new V8Text::V8TextPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h
index fdabf6e..4861dc8 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ class V8Text {
public:
struct V8TextPrivate {
V8DOM* dom;
- Arabica::DOM::Text<std::string>* arabicaThis;
+ Arabica::DOM::Text<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8TextPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp
index 0d6210f..968e53d 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp
@@ -11,34 +11,34 @@ v8::Handle<v8::Value> V8XPathResult::numberValueAttrGetter(v8::Local<v8::String>
v8::Local<v8::Object> self = info.Holder();
struct V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- return v8::Number::New(privData->arabicaThis->asNumber());
+ return v8::Number::New(privData->nativeObj->asNumber());
}
v8::Handle<v8::Value> V8XPathResult::stringValueAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- return v8::String::New(privData->arabicaThis->asString().c_str());
+ return v8::String::New(privData->nativeObj->asString().c_str());
}
v8::Handle<v8::Value> V8XPathResult::booleanValueAttrGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info) {
v8::Local<v8::Object> self = info.Holder();
struct V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- return v8::Boolean::New(privData->arabicaThis->asBool());
+ return v8::Boolean::New(privData->nativeObj->asBool());
}
v8::Handle<v8::Value> V8XPathResult::asNodeSetCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- Arabica::XPath::NodeSet<std::string>* retVal = new Arabica::XPath::NodeSet<std::string>(privData->arabicaThis->asNodeSet());
+ Arabica::XPath::NodeSet<std::string>* retVal = new Arabica::XPath::NodeSet<std::string>(privData->nativeObj->asNodeSet());
v8::Handle<v8::Function> retCtor = V8NodeSet::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8NodeSet::V8NodeSetPrivate* retPrivData = new V8NodeSet::V8NodeSetPrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));
@@ -52,7 +52,7 @@ v8::Handle<v8::Value> V8XPathResult::asBoolCallback(const v8::Arguments& args) {
v8::Local<v8::Object> self = args.Holder();
struct V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- bool retVal = privData->arabicaThis->asBool();
+ bool retVal = privData->nativeObj->asBool();
return v8::Boolean::New(retVal);
}
@@ -62,7 +62,7 @@ v8::Handle<v8::Value> V8XPathResult::asStringCallback(const v8::Arguments& args)
v8::Local<v8::Object> self = args.Holder();
struct V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- std::string retVal = privData->arabicaThis->asString();
+ std::string retVal = privData->nativeObj->asString();
return v8::String::New(retVal.c_str());
}
@@ -72,7 +72,7 @@ v8::Handle<v8::Value> V8XPathResult::asNumberCallback(const v8::Arguments& args)
v8::Local<v8::Object> self = args.Holder();
struct V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- double retVal = privData->arabicaThis->asNumber();
+ double retVal = privData->nativeObj->asNumber();
return v8::Number::New(retVal);
}
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h
index 96410df..9a3bf4d 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h
@@ -1,5 +1,5 @@
/*
- This file is part of the Arabica open source project.
+ This file is part of the Wrapper open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ class V8XPathResult {
public:
struct V8XPathResultPrivate {
V8DOM* dom;
- Arabica::XPath::XPathValue<std::string>* arabicaThis;
+ Arabica::XPath::XPathValue<std::string>* nativeObj;
};
V8_DESTRUCTOR(V8XPathResultPrivate);
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp
index 38b2cb5..6accfc7 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp
@@ -8,14 +8,14 @@ v8::Handle<v8::Value> V8XPathResult::singleNodeValueCustomAttrGetter(v8::Local<v
v8::Local<v8::Object> self = info.Holder();
V8XPathResultPrivate* privData = V8DOM::toClassPtr<V8XPathResultPrivate >(self->GetInternalField(0));
- Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->arabicaThis->asNodeSet()[0]);
+ Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->asNodeSet()[0]);
v8::Handle<v8::Function> retCtor = V8Node::getTmpl()->GetFunction();
v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance());
struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate();
retPrivData->dom = privData->dom;
- retPrivData->arabicaThis = retVal;
+ retPrivData->nativeObj = retVal;
retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));