diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-21 23:47:54 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-21 23:47:54 (GMT) |
commit | 3be96d1aa3024c1acc129e587f5d3165c9434e48 (patch) | |
tree | fae65a932b899ed9424a5a76b9b98562d979fe40 /src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp | |
parent | 3bda299c6d2efce71d76b44dea8e732a073304f3 (diff) | |
download | uscxml-3be96d1aa3024c1acc129e587f5d3165c9434e48.zip uscxml-3be96d1aa3024c1acc129e587f5d3165c9434e48.tar.gz uscxml-3be96d1aa3024c1acc129e587f5d3165c9434e48.tar.bz2 |
See detailed commitlog
- Started DirectoryMonitor invoker
- Refactored Invoker / IOProcessor interface
- Started with JavaScriptCore bindings
- Embedding applications can now use setParentQueue to receive events
sent to #_parent
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp')
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp new file mode 100644 index 0000000..a9e69e6 --- /dev/null +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp @@ -0,0 +1,38 @@ +#include "JSCNode.h" +#include "JSCProcessingInstruction.h" + +namespace Arabica { +namespace DOM { + + +JSStaticValue JSCProcessingInstruction::staticValues[] = { + { "target", targetAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, + { "data", dataAttrGetter, dataAttrSetter, kJSPropertyAttributeDontDelete }, + + { 0, 0, 0, 0 } +}; + +JSStaticFunction JSCProcessingInstruction::staticFunctions[] = { + { 0, 0, 0 } +}; + +JSValueRef JSCProcessingInstruction::targetAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { + struct JSCProcessingInstructionPrivate* privData = static_cast<JSCProcessingInstruction::JSCProcessingInstructionPrivate* >(JSObjectGetPrivate(thisObj)); + JSStringRef retString = JSStringCreateWithUTF8CString(privData->arabicaThis->getTarget().c_str()); + JSValueRef retObj = JSValueMakeString(ctx, retString); + JSStringRelease(retString); + return retObj; + +} + +JSValueRef JSCProcessingInstruction::dataAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { + struct JSCProcessingInstructionPrivate* privData = static_cast<JSCProcessingInstruction::JSCProcessingInstructionPrivate* >(JSObjectGetPrivate(thisObj)); + JSStringRef retString = JSStringCreateWithUTF8CString(privData->arabicaThis->getData().c_str()); + JSValueRef retObj = JSValueMakeString(ctx, retString); + JSStringRelease(retString); + return retObj; + +} + +} +} |