diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-05-12 13:12:33 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-05-12 13:12:33 (GMT) |
commit | b62e7979600feee23dc7cdb61042a8fc7673122b (patch) | |
tree | f7351372f37979dd2d048e0b68a16a4cd3b2aadb /src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore | |
parent | 1b11b310be61e51b3ac5ebb83f7c8a33aef3d6e8 (diff) | |
download | uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.zip uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.gz uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.bz2 |
Major Refactoring v2.0
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore')
79 files changed, 9847 insertions, 10780 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp deleted file mode 100644 index 402152d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "JSCDOM.h" - -namespace Arabica { -namespace DOM { - -JSCDOM::JSCDOM() { - nsInfo = NULL; - xpath = NULL; - storage = NULL; -} - -JSCDOM::~JSCDOM() { - if (nsInfo) - delete(nsInfo); - if (xpath) - delete(xpath); - if (storage) - delete(storage); - -} - -} -}
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp.inc b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp.inc new file mode 100644 index 0000000..11a8863 --- /dev/null +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp.inc @@ -0,0 +1,9576 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.8 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template<typename T> class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); + SwigValueWrapper(const SwigValueWrapper<T>& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template <typename T> T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + +#define SWIG_AsCharPtrAndSize(val, cptr, psize, alloc) SWIG_JSC_AsCharPtrAndSize(context, val, cptr, psize, alloc) +#define SWIG_FromCharPtrAndSize(cptr, size) SWIG_JSC_FromCharPtrAndSize(context, cptr, size) +#define SWIG_FromCharPtr(cptr) SWIG_JSC_FromCharPtr(context, cptr) + + +#define SWIG_JSC_FROM_DECL_ARGS(arg1) (JSContextRef context, arg1) +#define SWIG_JSC_FROM_CALL_ARGS(arg1) (context, arg1) +#define SWIG_JSC_AS_DECL_ARGS(arg1, arg2) (JSContextRef context, arg1, arg2) +#define SWIG_JSC_AS_CALL_ARGS(arg1, arg2) (context, arg1, arg2) + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +#include <JavaScriptCore/JavaScript.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <limits.h> + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if (<obj is ok>) { + if (<need new object>) { + *ptr = <ptr to new allocated object>; + return SWIG_NEWOBJ; + } else { + *ptr = <ptr to old object>; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include <string.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class<int>" == "Class<int >", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* ---------------------------------------------------------------------------- + * Errors and exceptions + * + * ---------------------------------------------------------------------------*/ + +#define SWIG_Error(code, msg) SWIG_JSC_exception(context, exception, code, msg) +#define SWIG_exception(code, msg) SWIG_JSC_exception(context, exception, code, msg) +#define SWIG_fail goto fail + +SWIGRUNTIME void SWIG_Javascript_Raise(JSContextRef context, JSValueRef *exception, const char* type) { + JSStringRef message = JSStringCreateWithUTF8CString(type); + JSValueRef error_arguments[1]; + JSObjectRef exception_object; + JSValueRef exception_value; + exception_value = JSValueMakeString(context, message); + /* Converting the result to an object will let JavascriptCore add + "sourceURL" (file) and "line" (number) and "message" to the exception, + instead of just returning a raw string. This is extremely important for debugging your errors. + Using JSObjectMakeError is better than JSValueToObject because the latter only populates + "sourceURL" and "line", but not "message" or any others I don't know about. + */ + error_arguments[0] = exception_value; + exception_object = JSObjectMakeError(context, 1, error_arguments, NULL); + + /* Return the exception_object */ + *exception = exception_object; + + JSStringRelease(message); +} + +SWIGRUNTIME void SWIG_JSC_exception(JSContextRef context, JSValueRef *exception, int code, const char* msg) { + SWIG_Javascript_Raise(context, exception, msg); +} + +/* ---------------------------------------------------------------------------- + * The parent class of all Proxies + * + * ---------------------------------------------------------------------------*/ + +typedef struct { + bool swigCMemOwn; + void *swigCObject; + swig_type_info *info; +} SwigPrivData; + +SWIGRUNTIME JSValueRef _wrap_SwigObject_disown(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + + JSObjectRef obj = JSValueToObject(context, thisObject, NULL); + SwigPrivData *cdata = (SwigPrivData *) JSObjectGetPrivate(obj); + + cdata->swigCMemOwn = false; + + jsresult = JSValueMakeUndefined(context); + return jsresult; +} + +SWIGRUNTIME JSValueRef _wrap_SwigObject_getCPtr(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + long result; + + JSObjectRef obj = JSValueToObject(context, thisObject, NULL); + SwigPrivData *cdata = (SwigPrivData*) JSObjectGetPrivate(obj); + + result = (long) cdata->swigCObject; + jsresult = JSValueMakeNumber(context, result); + + return jsresult; +} + +SWIGRUNTIME JSValueRef _wrap_SwigObject_equals(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + bool result; + + JSObjectRef obj = JSValueToObject(context, thisObject, NULL); + SwigPrivData *cdata = (SwigPrivData*) JSObjectGetPrivate(obj); + + JSObjectRef obj2 = JSValueToObject(context, argv[0], NULL); + SwigPrivData *cdata2 = (SwigPrivData*) JSObjectGetPrivate(obj2); + + result = (cdata->swigCObject == cdata2->swigCObject); + jsresult = JSValueMakeBoolean(context, result); + + return jsresult; +} + +SWIGRUNTIME JSStaticValue _SwigObject_values[] = { + { + 0, 0, 0, 0 + } +}; + +SWIGRUNTIME JSStaticFunction _SwigObject_functions[] = { + { + "disown",_wrap_SwigObject_disown, kJSPropertyAttributeNone + }, + { + "equals",_wrap_SwigObject_equals, kJSPropertyAttributeNone + }, + { + "getCPtr",_wrap_SwigObject_getCPtr, kJSPropertyAttributeNone + }, + { + 0, 0, 0 + } +}; + +SWIGRUNTIME JSClassDefinition _SwigObject_objectDefinition; + +SWIGRUNTIME JSClassRef _SwigObject_classRef; + + +SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void** ptr, swig_type_info *info, int flags) { + SwigPrivData *cdata; + + cdata = (SwigPrivData *) JSObjectGetPrivate(objRef); + if(cdata == NULL) { + return SWIG_ERROR; + } + if(cdata->info != info) { + bool type_valid = false; + swig_cast_info *t = info->cast; + while(t != NULL) { + if(t->type == cdata->info) { + type_valid = true; + break; + } + t = t->next; + } + if(!type_valid) { + return SWIG_TypeError; + } + } + + *ptr = cdata->swigCObject; + + if(flags & SWIG_POINTER_DISOWN) { + cdata->swigCMemOwn = false; + } + + return SWIG_OK; +} + +SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) { + JSObjectRef objRef; + + /* special case: JavaScript null => C NULL pointer */ + if(JSValueIsNull(context, valRef)) { + *ptr=0; + return SWIG_OK; + } + + if(!JSValueIsObject(context, valRef)) { + return SWIG_TypeError; + } + + objRef = JSValueToObject(context, valRef, NULL); + if(objRef == NULL) { + return SWIG_ERROR; + } + + return SWIG_JSC_ConvertInstancePtr(context, objRef, ptr, info, flags); +} + +SWIGRUNTIME JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_info *info, int flags) { + JSClassRef classRef; + JSObjectRef result; + SwigPrivData *cdata; + + if (ptr == NULL) { + // HACK: it is not possible to use JSValueToObject (causing seg-fault) + // This static cast turned out to be a workaround + // In future, we should change the interface of this method + // to return JSValueRef instead of JSObjectRef. + return (JSObjectRef) JSValueMakeNull(context); + } + + if(info->clientdata == NULL) { + classRef = _SwigObject_classRef; + } else { + classRef = (JSClassRef) info->clientdata; + } + + result = JSObjectMake(context, classRef, NULL); + + cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData)); + cdata->swigCObject = ptr; + cdata->swigCMemOwn = (flags & SWIG_POINTER_OWN) ? 1 : 0; + cdata->info = info; + + JSObjectSetPrivate(result, cdata); + + return result; +} + +#define SWIG_ConvertPtr(obj, ptr, info, flags) SWIG_JSC_ConvertPtr(context, obj, ptr, info, flags) +#define SWIG_NewPointerObj(ptr, info, flags) SWIG_JSC_NewPointerObj(context, ptr, info, flags) + +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_JSC_ConvertInstancePtr(context, obj, pptr, type, flags) +#define SWIG_NewInstanceObj(thisvalue, type, flags) SWIG_JSC_NewPointerObj(context, thisvalue, type, flags) + +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_JSC_ConvertPtr(context, obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_JSC_NewPointerObj(context, ptr, type, 0) + +/* ---------------------------------------------------------------------------- + * A class for packed data + * + * ---------------------------------------------------------------------------*/ + +typedef struct { + void *data; + size_t size; + swig_type_info *type; +} SwigPackedData; + +SWIGRUNTIME JSStaticValue _SwigPackedData_values[] = { + { + 0, 0, 0, 0 + } +}; +SWIGRUNTIME JSStaticFunction _SwigPackedData_functions[] = { + { + 0, 0, 0 + } +}; +SWIGRUNTIME JSClassDefinition _SwigPackedData_objectDefinition; +SWIGRUNTIME JSClassRef _SwigPackedData_classRef; + +SWIGRUNTIMEINLINE +int SwigJSCPacked_Check(JSContextRef context, JSValueRef valRef) { + return JSValueIsObjectOfClass(context, valRef, _SwigPackedData_classRef); +} + +SWIGRUNTIME +swig_type_info* SwigJSCPacked_UnpackData(JSContextRef context, JSValueRef valRef, void *ptr, size_t size) { + if (SwigJSCPacked_Check(context, valRef)) { + JSObjectRef objRef = JSValueToObject(context, valRef, NULL); + SwigPackedData *sobj = (SwigPackedData *) JSObjectGetPrivate(objRef); + if (sobj->size != size) return 0; + memcpy(ptr, sobj->data, size); + return sobj->type; + } else { + return 0; + } +} + +SWIGRUNTIME +int SWIG_JSC_ConvertPacked(JSContextRef context, JSValueRef valRef, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigJSCPacked_UnpackData(context, valRef, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +SWIGRUNTIME +JSValueRef SWIG_JSC_NewPackedObj(JSContextRef context, void *data, size_t size, swig_type_info *type) { + + JSClassRef classRef = _SwigObject_classRef; + JSObjectRef result = JSObjectMake(context, classRef, NULL); + + SwigPackedData* cdata = (SwigPackedData*) malloc(sizeof(SwigPackedData)); + cdata->data = data; + cdata->size = size; + cdata->type = type; + + JSObjectSetPrivate(result, cdata); + + return result; +} + +/* SwigPackedData wrappers */ +SWIGRUNTIME +void _wrap_SwigPackedData_delete(JSObjectRef obj) +{ + SwigPackedData* cdata = (SwigPackedData*) JSObjectGetPrivate(obj); + if (cdata) { + free(cdata->data); + } +} + +/* for C++ member pointers, ie, member methods */ + +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_JSC_ConvertPacked(context, obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_JSC_NewPackedObj(context, ptr, sz, type) + + +/* --------------------------------------------------------------------------- + * Support for IN/OUTPUT typemaps (see Lib/typemaps/inoutlist.swg) + * + * ---------------------------------------------------------------------------*/ +SWIGRUNTIME +unsigned int SWIGJSC_ArrayLength(JSContextRef context, JSObjectRef arr) { + static JSStringRef LENGTH = 0; + JSValueRef exception = NULL; + JSValueRef js_length; + double length; + + if (LENGTH == 0) { + LENGTH = JSStringCreateWithUTF8CString("length"); + } + + js_length = JSObjectGetProperty(context, arr, LENGTH, &exception); + if (exception == 0 && JSValueIsNumber(context, js_length)) { + length = JSValueToNumber(context, js_length, 0); + return (unsigned int) length; + } else { + return 0; + } +} + +SWIGRUNTIME +JSValueRef SWIGJSC_AppendOutput(JSContextRef context, JSValueRef value, JSValueRef obj) { + JSObjectRef arr; + unsigned int length; + + if (JSValueIsUndefined(context, value)) { + arr = JSObjectMakeArray(context, 0, 0, 0); + } else { + arr = JSValueToObject(context, value, 0); + } + + length = SWIGJSC_ArrayLength(context, arr); + JSObjectSetPropertyAtIndex(context, arr, length, obj, 0); + return arr; +} + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_Data swig_types[0] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr swig_types[1] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection swig_types[2] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData swig_types[3] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment swig_types[4] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument swig_types[5] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment swig_types[6] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType swig_types[7] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement swig_types[8] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity swig_types[9] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference swig_types[10] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException swig_types[11] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap swig_types[12] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode swig_types[13] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList swig_types[14] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation swig_types[15] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction swig_types[16] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText swig_types[17] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo swig_types[18] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler swig_types[19] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager swig_types[20] +#define SWIGTYPE_p_bool swig_types[21] +#define SWIGTYPE_p_char swig_types[22] +#define SWIGTYPE_p_int16_t swig_types[23] +#define SWIGTYPE_p_int32_t swig_types[24] +#define SWIGTYPE_p_int64_t swig_types[25] +#define SWIGTYPE_p_namelist_t swig_types[26] +#define SWIGTYPE_p_params_t swig_types[27] +#define SWIGTYPE_p_size_t swig_types[28] +#define SWIGTYPE_p_ssize_t swig_types[29] +#define SWIGTYPE_p_std__listT_Data_t swig_types[30] +#define SWIGTYPE_p_std__multimapT_std__string_Data_t swig_types[31] +#define SWIGTYPE_p_uint16_t swig_types[32] +#define SWIGTYPE_p_uint32_t swig_types[33] +#define SWIGTYPE_p_uint64_t swig_types[34] +#define SWIGTYPE_p_unsigned_char swig_types[35] +#define SWIGTYPE_p_uscxml__ErrorEvent swig_types[36] +#define SWIGTYPE_p_uscxml__Event swig_types[37] +#define SWIGTYPE_p_void swig_types[38] +static swig_type_info *swig_types[40]; +static swig_module_info swig_module = {swig_types, 39, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + + + +#define SWIGVERSION 0x030008 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +#include <stdexcept> + + +SWIGINTERNINLINE JSValueRef + SWIG_From_int SWIG_JSC_FROM_DECL_ARGS(int value) +{ + return JSValueMakeNumber(context, value); +} + + +#include <string> + + +#include "xercesc/sax/InputSource.hpp" +#include "xercesc/sax/SAXException.hpp" +#include "xercesc/sax/SAXParseException.hpp" +#include "xercesc/sax/Locator.hpp" +#include "xercesc/sax/HandlerBase.hpp" +#include "xercesc/sax2/Attributes.hpp" +#include "xercesc/sax2/ContentHandler.hpp" +#include "xercesc/sax2/LexicalHandler.hpp" +#include "xercesc/sax2/DefaultHandler.hpp" +#include "xercesc/sax2/SAX2XMLReader.hpp" +#include "xercesc/sax2/XMLReaderFactory.hpp" +#include "xercesc/util/PlatformUtils.hpp" +#include "xercesc/util/TransService.hpp" +#include "xercesc/util/XMLString.hpp" +#include "xercesc/util/XMLUri.hpp" +#include "xercesc/util/QName.hpp" +#include "xercesc/util/HexBin.hpp" +#include "xercesc/util/Base64.hpp" +#include "xercesc/parsers/AbstractDOMParser.hpp" +#include "xercesc/parsers/XercesDOMParser.hpp" +#include "xercesc/parsers/SAXParser.hpp" +#include "xercesc/dom/DOM.hpp" +#include "xercesc/framework/LocalFileInputSource.hpp" +#include "xercesc/framework/MemBufInputSource.hpp" +#include "xercesc/framework/StdInInputSource.hpp" +#include "xercesc/framework/URLInputSource.hpp" +#include "xercesc/framework/XMLGrammarDescription.hpp" +#include "xercesc/framework/XMLDTDDescription.hpp" +#include "xercesc/framework/XMLSchemaDescription.hpp" +#include "xercesc/util/NameIdPool.hpp" +#include "xercesc/util/XMLEnumerator.hpp" +#include "xercesc/framework/XMLValidator.hpp" +#include "xercesc/validators/common/Grammar.hpp" +#include "xercesc/validators/DTD/DTDAttDef.hpp" +#include "xercesc/validators/DTD/DTDAttDefList.hpp" +#include "xercesc/validators/DTD/DTDGrammar.hpp" +#include "xercesc/validators/DTD/DTDValidator.hpp" +#include "xercesc/validators/schema/SchemaGrammar.hpp" +#include "xercesc/validators/schema/SchemaValidator.hpp" +#include "xercesc/validators/schema/SchemaAttDefList.hpp" +#include "xercesc/validators/schema/SchemaAttDef.hpp" +#include "xercesc/framework/XMLFormatter.hpp" +#include "xercesc/framework/MemBufFormatTarget.hpp" +#include "xercesc/framework/LocalFileFormatTarget.hpp" +#include "xercesc/framework/StdOutFormatTarget.hpp" +#include "xercesc/framework/Wrapper4InputSource.hpp" +#include "xercesc/framework/psvi/PSVIHandler.hpp" + +// for resolving XMLExceptions +#include "xercesc/util/ArrayIndexOutOfBoundsException.hpp" +#include "xercesc/util/EmptyStackException.hpp" +#include "xercesc/util/IllegalArgumentException.hpp" +#include "xercesc/util/InvalidCastException.hpp" +#include "xercesc/util/IOException.hpp" +#include "xercesc/util/NoSuchElementException.hpp" +#include "xercesc/util/NullPointerException.hpp" +#include "xercesc/util/NumberFormatException.hpp" +#include "xercesc/util/ParseException.hpp" +#include "xercesc/util/RuntimeException.hpp" +#include "xercesc/util/SchemaDateTimeException.hpp" +#include "xercesc/util/TranscodingException.hpp" +#include "xercesc/util/UnexpectedEOFException.hpp" +#include "xercesc/util/UnsupportedEncodingException.hpp" +#include "xercesc/util/UTFDataFormatException.hpp" +#include "xercesc/util/XMLNetAccessor.hpp" +#include "xercesc/internal/XSerializationException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeFacetException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeValueException.hpp" +#include "xercesc/validators/schema/identity/XPathException.hpp" + +XERCES_CPP_NAMESPACE_USE + +// we initialize the static UTF-8 transcoding info +// these are used by the typemaps to convert between +// Xerces internal UTF-16 and Perl's internal UTF-8 +static XMLCh* UTF8_ENCODING = NULL; +static XMLTranscoder* UTF8_TRANSCODER = NULL; + +static bool DEBUG_UTF8_OUT = 0; +static bool DEBUG_UTF8_IN = 0; + + + +SWIGINTERN int +SWIG_AsVal_double SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, double *val) +{ + if(!JSValueIsNumber(context, obj)) { + return SWIG_TypeError; + } + if(val) *val = JSValueToNumber(context, obj, NULL); + + return SWIG_OK; +} + + +#include <float.h> + + +#include <math.h> + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_long SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, long* val) +{ + if (!JSValueIsNumber(context, obj)) { + return SWIG_TypeError; + } + if(val) *val = (long) JSValueToNumber(context, obj, NULL); + + return SWIG_OK; +} + + +SWIGINTERN +int SWIG_AsVal_bool SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, bool *val) +{ + if(!JSValueIsBoolean(context, obj)) { + return SWIG_ERROR; + } + if (val) *val = JSValueToBoolean(context, obj); + return SWIG_OK; +} + + +SWIGINTERNINLINE +JSValueRef SWIG_From_bool SWIG_JSC_FROM_DECL_ARGS(bool value) +{ + return JSValueMakeBoolean(context, value); +} + + +static swig_type_info * +DOMNode_dynamic_cast(void **ptr) { + DOMNode **nptr = (DOMNode **) ptr; + if (*nptr == NULL) { + return NULL; + } + short int type = (*nptr)->getNodeType(); + if (type == DOMNode::TEXT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText; + } + if (type == DOMNode::PROCESSING_INSTRUCTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction; + } + if (type == DOMNode::DOCUMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument; + } + if (type == DOMNode::ELEMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement; + } + if (type == DOMNode::ENTITY_REFERENCE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::COMMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment; + } + if (type == DOMNode::DOCUMENT_TYPE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType; + } + if (type == DOMNode::ENTITY_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity; + } + if (type == DOMNode::ATTRIBUTE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr; + } + if (type == DOMNode::NOTATION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation; + } + return NULL; +} + + +#include <limits.h> +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_short SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, short *val) +{ + long v; + int res = SWIG_AsVal_long SWIG_JSC_AS_CALL_ARGS(obj, &v); + if (SWIG_IsOK(res)) { + if ((v < SHRT_MIN || v > SHRT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (short)(v); + } + } + return res; +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_long SWIG_JSC_FROM_DECL_ARGS(long value) +{ + return JSValueMakeNumber(context, value); +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_short SWIG_JSC_FROM_DECL_ARGS(short value) +{ + return SWIG_From_long SWIG_JSC_FROM_CALL_ARGS(value); +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_unsigned_SS_long SWIG_JSC_FROM_DECL_ARGS(unsigned long value) +{ + return (value > LONG_MAX) ? + JSValueMakeNumber(context, value) : JSValueMakeNumber(context, (long)(value)); +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_size_t SWIG_JSC_FROM_DECL_ARGS(size_t value) +{ + return SWIG_From_unsigned_SS_long SWIG_JSC_FROM_CALL_ARGS((unsigned long)(value)); +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, unsigned long *val) +{ + long longVal; + if(!JSValueIsNumber(context, obj)) { + return SWIG_TypeError; + } + + longVal = (long) JSValueToNumber(context, obj, NULL); + + if(longVal < 0) { + return SWIG_OverflowError; + } + + if(val) *val = longVal; + + return SWIG_OK; +} + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, size_t *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long SWIG_JSC_AS_CALL_ARGS(obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + return res; +} + + +using uscxml::Data; + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_JSC_AsCharPtrAndSize(JSContextRef context, JSValueRef valRef, char** cptr, size_t* psize, int *alloc) +{ + if(JSValueIsString(context, valRef)) { + JSStringRef js_str = JSValueToStringCopy(context, valRef, NULL); + size_t len = JSStringGetMaximumUTF8CStringSize(js_str); + char* cstr = (char*) (new char[len]); + /* JSStringGetUTF8CString returns the length including 0-terminator */ + len = JSStringGetUTF8CString(js_str, cstr, len); + + if(alloc) *alloc = SWIG_NEWOBJ; + if(psize) *psize = len; + if(cptr) *cptr = cstr; + + return SWIG_OK; + } else { + if(JSValueIsObject(context, valRef)) { + JSObjectRef obj = JSValueToObject(context, valRef, NULL); + // try if the object is a wrapped char[] + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + return SWIG_TypeError; + } else { + return SWIG_TypeError; + } + } +} + + +SWIGINTERN int +SWIG_AsPtr_std_string SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + + +SWIGINTERN int +SWIG_AsVal_int SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, int *val) +{ + long v; + int res = SWIG_AsVal_long SWIG_JSC_AS_CALL_ARGS(obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + + +SWIGINTERNINLINE JSValueRef +SWIG_JSC_FromCharPtrAndSize(JSContextRef context, const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + // TODO: handle extra long strings + //swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + //return pchar_descriptor ? + // SWIG_InternalNewPointerObj(%const_cast(carray,char *), pchar_descriptor, 0) : SWIG_Py_Void(); + return JSValueMakeUndefined(context); + } else { + JSStringRef jsstring; + JSValueRef result; + if(size < 2) { + char c[2]; + int i; + for(i=0;i<size;++i) { + c[i] = carray[i]; + } + c[size] = 0; + jsstring = JSStringCreateWithUTF8CString(c); + } else { + jsstring = JSStringCreateWithUTF8CString(carray); + } + result = JSValueMakeString(context, jsstring); + JSStringRelease(jsstring); + return result; + } + } else { + return JSValueMakeUndefined(context); + } +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_std_string SWIG_JSC_FROM_DECL_ARGS(const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + +#define SWIGJSC_INIT JSCDOM_initialize + + + + +SWIGINTERN bool JS_registerClass(JSGlobalContextRef context, JSObjectRef parentObject, + const char* className, + JSClassDefinition* definition) { + + JSStringRef js_className = JSStringCreateWithUTF8CString(className); + JSObjectRef classObject = JSObjectMake(context, JSClassCreate(definition), NULL); + JSObjectSetProperty(context, parentObject, + js_className, classObject, + kJSPropertyAttributeNone, NULL); + JSStringRelease(js_className); + + return true; +} + +SWIGINTERN bool JS_registerNamespace(JSGlobalContextRef context, + JSObjectRef namespaceObj, JSObjectRef parentNamespace, + const char* name) +{ + JSStringRef js_name = JSStringCreateWithUTF8CString(name); + JSObjectSetProperty(context, parentNamespace, + js_name, namespaceObj, + kJSPropertyAttributeNone, NULL); + JSStringRelease(js_name); + + return true; +} + + +SWIGINTERN bool JS_registerFunction(JSGlobalContextRef context, JSObjectRef object, + const char* functionName, JSObjectCallAsFunctionCallback callback) +{ + JSStringRef js_functionName = JSStringCreateWithUTF8CString(functionName); + JSObjectSetProperty(context, object, js_functionName, + JSObjectMakeFunctionWithCallback(context, js_functionName, callback), + kJSPropertyAttributeNone, NULL); + JSStringRelease(js_functionName); + return true; +} + +SWIGINTERN bool JS_veto_set_variable(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + char buffer[256]; + char msg[512]; + int res; + + JSStringGetUTF8CString(propertyName, buffer, 256); + res = sprintf(msg, "Tried to write read-only variable: %s.", buffer); + + if(res<0) { + SWIG_exception(SWIG_ERROR, "Tried to write read-only variable."); + } else { + SWIG_exception(SWIG_ERROR, msg); + } + + return false; +} + +SWIGINTERN JSValueRef JS_CharPtrToJSValue(JSContextRef context, char* cstr) { + JSValueRef val; + + JSStringRef jsstring = JSStringCreateWithUTF8CString((char*) cstr); + val = JSValueMakeString(context, jsstring); + JSStringRelease(jsstring); + + return val; +} + + +static JSValueRef _wrap_XERCES_HAS_CPP_NAMESPACE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(1)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_DEBUG_UTF8_OUT_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + + ecode1 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(value, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DEBUG_UTF8_OUT_set" "', argument " "1"" of type '" "bool""'"); + } + arg1 = (bool)(val1); + DEBUG_UTF8_OUT = arg1; + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_DEBUG_UTF8_OUT_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + bool result; + + JSValueRef jsresult; + + result = (bool)DEBUG_UTF8_OUT; + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_DEBUG_UTF8_IN_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + + ecode1 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(value, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DEBUG_UTF8_IN_set" "', argument " "1"" of type '" "bool""'"); + } + arg1 = (bool)(val1); + DEBUG_UTF8_IN = arg1; + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_DEBUG_UTF8_IN_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + bool result; + + JSValueRef jsresult; + + result = (bool)DEBUG_UTF8_IN; + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSClassDefinition _exports_DOMException_classDefinition; + +static JSClassDefinition _exports_DOMException_objectDefinition; + +static JSClassRef _exports_DOMException_classRef; + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_INDEX_SIZE_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::INDEX_SIZE_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_DOMSTRING_SIZE_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::DOMSTRING_SIZE_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_HIERARCHY_REQUEST_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::HIERARCHY_REQUEST_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_WRONG_DOCUMENT_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::WRONG_DOCUMENT_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_CHARACTER_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_CHARACTER_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_DATA_ALLOWED_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::NO_DATA_ALLOWED_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_MODIFICATION_ALLOWED_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::NO_MODIFICATION_ALLOWED_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_FOUND_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::NOT_FOUND_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_SUPPORTED_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::NOT_SUPPORTED_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_INUSE_ATTRIBUTE_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::INUSE_ATTRIBUTE_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_STATE_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_STATE_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_SYNTAX_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::SYNTAX_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_MODIFICATION_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_MODIFICATION_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_NAMESPACE_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::NAMESPACE_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_ACCESS_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_ACCESS_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_VALIDATION_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::VALIDATION_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMException_TYPE_MISMATCH_ERR(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMException::TYPE_MISMATCH_ERR)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSObjectRef _wrap_new_DOMException__SWIG_0(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + short arg1 ; + short arg2 ; + XERCES_CPP_NAMESPACE::MemoryManager *arg3 = (XERCES_CPP_NAMESPACE::MemoryManager *) (XERCES_CPP_NAMESPACE::MemoryManager *)0 ; + short val1 ; + int ecode1 = 0 ; + short val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMException *result; + ecode1 = SWIG_AsVal_short SWIG_JSC_AS_CALL_ARGS(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DOMException" "', argument " "1"" of type '" "short""'"); + } + arg1 = (short)(val1); + ecode2 = SWIG_AsVal_short SWIG_JSC_AS_CALL_ARGS(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DOMException" "', argument " "2"" of type '" "short""'"); + } + arg2 = (short)(val2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DOMException" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::MemoryManager *const""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::MemoryManager *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1,arg2,arg3); + + + + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_DOMException__SWIG_1(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + short arg1 ; + short arg2 ; + short val1 ; + int ecode1 = 0 ; + short val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMException *result; + ecode1 = SWIG_AsVal_short SWIG_JSC_AS_CALL_ARGS(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DOMException" "', argument " "1"" of type '" "short""'"); + } + arg1 = (short)(val1); + ecode2 = SWIG_AsVal_short SWIG_JSC_AS_CALL_ARGS(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DOMException" "', argument " "2"" of type '" "short""'"); + } + arg2 = (short)(val2); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1,arg2); + + + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_DOMException__SWIG_2(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + short arg1 ; + short val1 ; + int ecode1 = 0 ; + XERCES_CPP_NAMESPACE::DOMException *result; + ecode1 = SWIG_AsVal_short SWIG_JSC_AS_CALL_ARGS(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DOMException" "', argument " "1"" of type '" "short""'"); + } + arg1 = (short)(val1); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1); + + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_DOMException(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSObjectRef thisObject = NULL; + + // switch all cases by means of series of if-returns. + + if(argc == 3) { + thisObject = _wrap_new_DOMException__SWIG_0(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 2) { + thisObject = _wrap_new_DOMException__SWIG_1(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 1) { + thisObject = _wrap_new_DOMException__SWIG_2(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of $jsname"); + +fail: + return thisObject; +} + + +static void _wrap_delete_DOMException(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMException * arg1 = (XERCES_CPP_NAMESPACE::DOMException *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMException_getMessage(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMException_getMessage."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_getMessage" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMException const *)arg1)->getMessage(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_DOMException_code_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + short arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + short val2 ; + int ecode2 = 0 ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_code_set" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + ecode2 = SWIG_AsVal_short SWIG_JSC_AS_CALL_ARGS(value, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMException_code_set" "', argument " "2"" of type '" "short""'"); + } + arg2 = (short)(val2); + if (arg1) (arg1)->code = arg2; + + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_DOMException_code_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + short result; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_code_get" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (short) ((arg1)->code); + jsresult = SWIG_From_short SWIG_JSC_FROM_CALL_ARGS((short)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_DOMException_msg_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_msg_set" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + + arg2 = JS2XMLString(value, context); + + if (arg1) (arg1)->msg = (XMLCh const *)arg2; + + + delete[] arg2; + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_DOMException_msg_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_msg_get" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (XMLCh *) ((arg1)->msg); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMException_staticValues[] = { + { + "INDEX_SIZE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INDEX_SIZE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOMSTRING_SIZE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_DOMSTRING_SIZE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "HIERARCHY_REQUEST_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_HIERARCHY_REQUEST_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "WRONG_DOCUMENT_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_WRONG_DOCUMENT_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_CHARACTER_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_CHARACTER_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NO_DATA_ALLOWED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_DATA_ALLOWED_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NO_MODIFICATION_ALLOWED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_MODIFICATION_ALLOWED_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NOT_FOUND_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_FOUND_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NOT_SUPPORTED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_SUPPORTED_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INUSE_ATTRIBUTE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INUSE_ATTRIBUTE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_STATE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_STATE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "SYNTAX_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_SYNTAX_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_MODIFICATION_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_MODIFICATION_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NAMESPACE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NAMESPACE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_ACCESS_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_ACCESS_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "VALIDATION_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_VALIDATION_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "TYPE_MISMATCH_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_TYPE_MISMATCH_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMException_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMException_values[] = { + { + "code", _wrap_DOMException_code_get, _wrap_DOMException_code_set, kJSPropertyAttributeNone + }, + + + { + "msg", _wrap_DOMException_msg_get, _wrap_DOMException_msg_set, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMException_functions[] = { + { + "getMessage", _wrap_DOMException_getMessage, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSClassDefinition _exports_DOMNode_classDefinition; + +static JSClassDefinition _exports_DOMNode_objectDefinition; + +static JSClassRef _exports_DOMNode_classRef; + + +static void _wrap_delete_DOMNode(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNode * arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ELEMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ELEMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ATTRIBUTE_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ATTRIBUTE_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_TEXT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::TEXT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_CDATA_SECTION_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::CDATA_SECTION_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_REFERENCE_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ENTITY_REFERENCE_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ENTITY_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_PROCESSING_INSTRUCTION_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::PROCESSING_INSTRUCTION_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_COMMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::COMMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_TYPE_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_TYPE_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_FRAGMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_FRAGMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_NOTATION_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::NOTATION_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_DISCONNECTED(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_DISCONNECTED)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_PRECEDING(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_PRECEDING)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_FOLLOWING(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_FOLLOWING)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINS(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINS)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINED_BY(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINED_BY)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNodeName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNodeValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeValue(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNodeType(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode::NodeType result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeType."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeType" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode::NodeType)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeType(); + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getParentNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getParentNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getParentNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getParentNode(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getChildNodes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getChildNodes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getChildNodes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getChildNodes(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getFirstChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getFirstChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getFirstChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFirstChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getLastChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getLastChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getLastChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLastChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getPreviousSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getPreviousSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getPreviousSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getPreviousSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNextSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNextSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNextSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNextSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getAttributes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getAttributes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getAttributes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getAttributes(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getOwnerDocument(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMDocument *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getOwnerDocument."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getOwnerDocument" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMDocument *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getOwnerDocument(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_cloneNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_cloneNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_cloneNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + ecode2 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNode_cloneNode" "', argument " "2"" of type '" "bool""'"); + } + arg2 = (bool)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->cloneNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_insertBefore(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_insertBefore."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_insertBefore" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_insertBefore" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_insertBefore" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->insertBefore(arg2,arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_replaceChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_replaceChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_replaceChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_replaceChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_replaceChild" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->replaceChild(arg2,arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_removeChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_removeChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_removeChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_removeChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeChild(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_appendChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_appendChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_appendChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_appendChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->appendChild(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_hasChildNodes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_hasChildNodes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_hasChildNodes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasChildNodes(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setNodeValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setNodeValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setNodeValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setNodeValue((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_normalize(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_normalize."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_normalize" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + (arg1)->normalize(); + jsresult = JSValueMakeUndefined(context); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isSupported(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isSupported."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isSupported" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSupported((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNamespaceURI(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNamespaceURI."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNamespaceURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNamespaceURI(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getLocalName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getLocalName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getLocalName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLocalName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setPrefix(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setPrefix."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setPrefix" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setPrefix((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_hasAttributes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_hasAttributes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_hasAttributes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasAttributes(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isSameNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isSameNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isSameNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_isSameNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSameNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isEqualNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isEqualNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isEqualNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_isEqualNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isEqualNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setUserData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *arg3 = (void *) 0 ; + XERCES_CPP_NAMESPACE::DOMUserDataHandler *arg4 = (XERCES_CPP_NAMESPACE::DOMUserDataHandler *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *result = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setUserData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setUserData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + res3 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_setUserData" "', argument " "3"" of type '" "void *""'"); + } + res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DOMNode_setUserData" "', argument " "4"" of type '" "XERCES_CPP_NAMESPACE::DOMUserDataHandler *""'"); + } + arg4 = (XERCES_CPP_NAMESPACE::DOMUserDataHandler *)(argp4); + result = (void *)(arg1)->setUserData((XMLCh const *)arg2,arg3,arg4); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getUserData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getUserData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getUserData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getUserData((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getBaseURI(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getBaseURI."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getBaseURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getBaseURI(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_compareDocumentPosition(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + short result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_compareDocumentPosition."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_compareDocumentPosition" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_compareDocumentPosition" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (short)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->compareDocumentPosition((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_short SWIG_JSC_FROM_CALL_ARGS((short)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getTextContent(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getTextContent."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getTextContent" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getTextContent(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setTextContent(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setTextContent."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setTextContent" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setTextContent((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_lookupPrefix(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_lookupPrefix."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_lookupPrefix" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupPrefix((XMLCh const *)arg2); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isDefaultNamespace(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isDefaultNamespace."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isDefaultNamespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isDefaultNamespace((XMLCh const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_lookupNamespaceURI(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_lookupNamespaceURI."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_lookupNamespaceURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupNamespaceURI((XMLCh const *)arg2); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getFeature(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getFeature."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getFeature" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFeature((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_release(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_release."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_release" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + (arg1)->release(); + jsresult = JSValueMakeUndefined(context); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNode_staticValues[] = { + { + "ELEMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ELEMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "ATTRIBUTE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ATTRIBUTE_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "TEXT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_TEXT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "CDATA_SECTION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_CDATA_SECTION_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "ENTITY_REFERENCE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_REFERENCE_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "ENTITY_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "PROCESSING_INSTRUCTION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_PROCESSING_INSTRUCTION_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "COMMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_COMMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_TYPE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_TYPE_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_FRAGMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_FRAGMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NOTATION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_NOTATION_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_DISCONNECTED", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_DISCONNECTED, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_PRECEDING", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_PRECEDING, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_FOLLOWING", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_FOLLOWING, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_CONTAINS", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINS, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_CONTAINED_BY", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINED_BY, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNode_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNode_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNode_functions[] = { + { + "getNodeName", _wrap_DOMNode_getNodeName, kJSPropertyAttributeNone + }, + + + { + "getNodeValue", _wrap_DOMNode_getNodeValue, kJSPropertyAttributeNone + }, + + + { + "getNodeType", _wrap_DOMNode_getNodeType, kJSPropertyAttributeNone + }, + + + { + "getParentNode", _wrap_DOMNode_getParentNode, kJSPropertyAttributeNone + }, + + + { + "getChildNodes", _wrap_DOMNode_getChildNodes, kJSPropertyAttributeNone + }, + + + { + "getFirstChild", _wrap_DOMNode_getFirstChild, kJSPropertyAttributeNone + }, + + + { + "getLastChild", _wrap_DOMNode_getLastChild, kJSPropertyAttributeNone + }, + + + { + "getPreviousSibling", _wrap_DOMNode_getPreviousSibling, kJSPropertyAttributeNone + }, + + + { + "getNextSibling", _wrap_DOMNode_getNextSibling, kJSPropertyAttributeNone + }, + + + { + "getAttributes", _wrap_DOMNode_getAttributes, kJSPropertyAttributeNone + }, + + + { + "getOwnerDocument", _wrap_DOMNode_getOwnerDocument, kJSPropertyAttributeNone + }, + + + { + "cloneNode", _wrap_DOMNode_cloneNode, kJSPropertyAttributeNone + }, + + + { + "insertBefore", _wrap_DOMNode_insertBefore, kJSPropertyAttributeNone + }, + + + { + "replaceChild", _wrap_DOMNode_replaceChild, kJSPropertyAttributeNone + }, + + + { + "removeChild", _wrap_DOMNode_removeChild, kJSPropertyAttributeNone + }, + + + { + "appendChild", _wrap_DOMNode_appendChild, kJSPropertyAttributeNone + }, + + + { + "hasChildNodes", _wrap_DOMNode_hasChildNodes, kJSPropertyAttributeNone + }, + + + { + "setNodeValue", _wrap_DOMNode_setNodeValue, kJSPropertyAttributeNone + }, + + + { + "normalize", _wrap_DOMNode_normalize, kJSPropertyAttributeNone + }, + + + { + "isSupported", _wrap_DOMNode_isSupported, kJSPropertyAttributeNone + }, + + + { + "getNamespaceURI", _wrap_DOMNode_getNamespaceURI, kJSPropertyAttributeNone + }, + + + { + "getLocalName", _wrap_DOMNode_getLocalName, kJSPropertyAttributeNone + }, + + + { + "setPrefix", _wrap_DOMNode_setPrefix, kJSPropertyAttributeNone + }, + + + { + "hasAttributes", _wrap_DOMNode_hasAttributes, kJSPropertyAttributeNone + }, + + + { + "isSameNode", _wrap_DOMNode_isSameNode, kJSPropertyAttributeNone + }, + + + { + "isEqualNode", _wrap_DOMNode_isEqualNode, kJSPropertyAttributeNone + }, + + + { + "setUserData", _wrap_DOMNode_setUserData, kJSPropertyAttributeNone + }, + + + { + "getUserData", _wrap_DOMNode_getUserData, kJSPropertyAttributeNone + }, + + + { + "getBaseURI", _wrap_DOMNode_getBaseURI, kJSPropertyAttributeNone + }, + + + { + "compareDocumentPosition", _wrap_DOMNode_compareDocumentPosition, kJSPropertyAttributeNone + }, + + + { + "getTextContent", _wrap_DOMNode_getTextContent, kJSPropertyAttributeNone + }, + + + { + "setTextContent", _wrap_DOMNode_setTextContent, kJSPropertyAttributeNone + }, + + + { + "lookupPrefix", _wrap_DOMNode_lookupPrefix, kJSPropertyAttributeNone + }, + + + { + "isDefaultNamespace", _wrap_DOMNode_isDefaultNamespace, kJSPropertyAttributeNone + }, + + + { + "lookupNamespaceURI", _wrap_DOMNode_lookupNamespaceURI, kJSPropertyAttributeNone + }, + + + { + "getFeature", _wrap_DOMNode_getFeature, kJSPropertyAttributeNone + }, + + + { + "release", _wrap_DOMNode_release, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNode(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNode can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMAttr_classDefinition; + +static JSClassDefinition _exports_DOMAttr_objectDefinition; + +static JSClassRef _exports_DOMAttr_classRef; + + +static void _wrap_delete_DOMAttr(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMAttr * arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMAttr_getName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getSpecified(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getSpecified."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getSpecified" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSpecified(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getValue(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_setValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_setValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_setValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setValue((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getOwnerElement(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getOwnerElement."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getOwnerElement" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getOwnerElement(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_isId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_isId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_isId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->isId(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getSchemaTypeInfo(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getSchemaTypeInfo."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getSchemaTypeInfo" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSchemaTypeInfo(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMAttr_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMAttr_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMAttr_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMAttr_functions[] = { + { + "getName", _wrap_DOMAttr_getName, kJSPropertyAttributeNone + }, + + + { + "getSpecified", _wrap_DOMAttr_getSpecified, kJSPropertyAttributeNone + }, + + + { + "getValue", _wrap_DOMAttr_getValue, kJSPropertyAttributeNone + }, + + + { + "setValue", _wrap_DOMAttr_setValue, kJSPropertyAttributeNone + }, + + + { + "getOwnerElement", _wrap_DOMAttr_getOwnerElement, kJSPropertyAttributeNone + }, + + + { + "isId", _wrap_DOMAttr_isId, kJSPropertyAttributeNone + }, + + + { + "getSchemaTypeInfo", _wrap_DOMAttr_getSchemaTypeInfo, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMAttr(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMAttr can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMElement_classDefinition; + +static JSClassDefinition _exports_DOMElement_objectDefinition; + +static JSClassRef _exports_DOMElement_classRef; + + +static void _wrap_delete_DOMElement(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMElement * arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMElement_getTagName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getTagName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getTagName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getTagName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttribute((XMLCh const *)arg2); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNode((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getElementsByTagName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getElementsByTagName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getElementsByTagName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagName((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + (arg1)->setAttribute((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_removeAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_removeAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->removeAttributeNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_removeAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->removeAttribute((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XMLCh *arg4 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + + arg4 = JS2XMLString(argv[2], context); + + (arg1)->setAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,(XMLCh const *)arg4); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + delete[] arg4; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_removeAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + (arg1)->removeAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttributeNodeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNodeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNodeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNodeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttributeNodeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNodeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNodeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setAttributeNodeNS" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNodeNS(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getElementsByTagNameNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getElementsByTagNameNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getElementsByTagNameNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagNameNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_hasAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_hasAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_hasAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttribute((XMLCh const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_hasAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_hasAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_hasAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setIdAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + ecode3 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMElement_setIdAttribute" "', argument " "3"" of type '" "bool""'"); + } + arg3 = (bool)(val3); + (arg1)->setIdAttribute((XMLCh const *)arg2,arg3); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setIdAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val4 ; + int ecode4 = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + ecode4 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DOMElement_setIdAttributeNS" "', argument " "4"" of type '" "bool""'"); + } + arg4 = (bool)(val4); + (arg1)->setIdAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,arg4); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setIdAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setIdAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + ecode3 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMElement_setIdAttributeNode" "', argument " "3"" of type '" "bool""'"); + } + arg3 = (bool)(val3); + (arg1)->setIdAttributeNode((XERCES_CPP_NAMESPACE::DOMAttr const *)arg2,arg3); + jsresult = JSValueMakeUndefined(context); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getSchemaTypeInfo(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getSchemaTypeInfo."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getSchemaTypeInfo" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getSchemaTypeInfo(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getFirstElementChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getFirstElementChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getFirstElementChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getFirstElementChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getLastElementChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getLastElementChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getLastElementChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getLastElementChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getPreviousElementSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getPreviousElementSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getPreviousElementSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getPreviousElementSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getNextElementSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getNextElementSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getNextElementSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getNextElementSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getChildElementCount(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getChildElementCount."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getChildElementCount" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getChildElementCount(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMElement_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMElement_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMElement_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMElement_functions[] = { + { + "getTagName", _wrap_DOMElement_getTagName, kJSPropertyAttributeNone + }, + + + { + "getAttribute", _wrap_DOMElement_getAttribute, kJSPropertyAttributeNone + }, + + + { + "getAttributeNode", _wrap_DOMElement_getAttributeNode, kJSPropertyAttributeNone + }, + + + { + "getElementsByTagName", _wrap_DOMElement_getElementsByTagName, kJSPropertyAttributeNone + }, + + + { + "setAttribute", _wrap_DOMElement_setAttribute, kJSPropertyAttributeNone + }, + + + { + "setAttributeNode", _wrap_DOMElement_setAttributeNode, kJSPropertyAttributeNone + }, + + + { + "removeAttributeNode", _wrap_DOMElement_removeAttributeNode, kJSPropertyAttributeNone + }, + + + { + "removeAttribute", _wrap_DOMElement_removeAttribute, kJSPropertyAttributeNone + }, + + + { + "getAttributeNS", _wrap_DOMElement_getAttributeNS, kJSPropertyAttributeNone + }, + + + { + "setAttributeNS", _wrap_DOMElement_setAttributeNS, kJSPropertyAttributeNone + }, + + + { + "removeAttributeNS", _wrap_DOMElement_removeAttributeNS, kJSPropertyAttributeNone + }, + + + { + "getAttributeNodeNS", _wrap_DOMElement_getAttributeNodeNS, kJSPropertyAttributeNone + }, + + + { + "setAttributeNodeNS", _wrap_DOMElement_setAttributeNodeNS, kJSPropertyAttributeNone + }, + + + { + "getElementsByTagNameNS", _wrap_DOMElement_getElementsByTagNameNS, kJSPropertyAttributeNone + }, + + + { + "hasAttribute", _wrap_DOMElement_hasAttribute, kJSPropertyAttributeNone + }, + + + { + "hasAttributeNS", _wrap_DOMElement_hasAttributeNS, kJSPropertyAttributeNone + }, + + + { + "setIdAttribute", _wrap_DOMElement_setIdAttribute, kJSPropertyAttributeNone + }, + + + { + "setIdAttributeNS", _wrap_DOMElement_setIdAttributeNS, kJSPropertyAttributeNone + }, + + + { + "setIdAttributeNode", _wrap_DOMElement_setIdAttributeNode, kJSPropertyAttributeNone + }, + + + { + "getSchemaTypeInfo", _wrap_DOMElement_getSchemaTypeInfo, kJSPropertyAttributeNone + }, + + + { + "getFirstElementChild", _wrap_DOMElement_getFirstElementChild, kJSPropertyAttributeNone + }, + + + { + "getLastElementChild", _wrap_DOMElement_getLastElementChild, kJSPropertyAttributeNone + }, + + + { + "getPreviousElementSibling", _wrap_DOMElement_getPreviousElementSibling, kJSPropertyAttributeNone + }, + + + { + "getNextElementSibling", _wrap_DOMElement_getNextElementSibling, kJSPropertyAttributeNone + }, + + + { + "getChildElementCount", _wrap_DOMElement_getChildElementCount, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMElement(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMElement can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMEntity_classDefinition; + +static JSClassDefinition _exports_DOMEntity_objectDefinition; + +static JSClassRef _exports_DOMEntity_classRef; + + +static void _wrap_delete_DOMEntity(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMEntity * arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMEntity_getPublicId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getPublicId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getSystemId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getSystemId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getNotationName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getNotationName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getNotationName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getNotationName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getInputEncoding(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getInputEncoding."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getInputEncoding" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getInputEncoding(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getXmlEncoding(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getXmlEncoding."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getXmlEncoding" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlEncoding(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getXmlVersion(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getXmlVersion."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getXmlVersion" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlVersion(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMEntity_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntity_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMEntity_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntity_functions[] = { + { + "getPublicId", _wrap_DOMEntity_getPublicId, kJSPropertyAttributeNone + }, + + + { + "getSystemId", _wrap_DOMEntity_getSystemId, kJSPropertyAttributeNone + }, + + + { + "getNotationName", _wrap_DOMEntity_getNotationName, kJSPropertyAttributeNone + }, + + + { + "getInputEncoding", _wrap_DOMEntity_getInputEncoding, kJSPropertyAttributeNone + }, + + + { + "getXmlEncoding", _wrap_DOMEntity_getXmlEncoding, kJSPropertyAttributeNone + }, + + + { + "getXmlVersion", _wrap_DOMEntity_getXmlVersion, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMEntity(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMEntity can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMDocumentType_classDefinition; + +static JSClassDefinition _exports_DOMDocumentType_objectDefinition; + +static JSClassRef _exports_DOMDocumentType_classRef; + + +static void _wrap_delete_DOMDocumentType(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMDocumentType * arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMDocumentType_getName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getEntities(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getEntities."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getEntities" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getEntities(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getNotations(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getNotations."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getNotations" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getNotations(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getPublicId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getPublicId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getSystemId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getSystemId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getInternalSubset(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getInternalSubset."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getInternalSubset" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getInternalSubset(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMDocumentType_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentType_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMDocumentType_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentType_functions[] = { + { + "getName", _wrap_DOMDocumentType_getName, kJSPropertyAttributeNone + }, + + + { + "getEntities", _wrap_DOMDocumentType_getEntities, kJSPropertyAttributeNone + }, + + + { + "getNotations", _wrap_DOMDocumentType_getNotations, kJSPropertyAttributeNone + }, + + + { + "getPublicId", _wrap_DOMDocumentType_getPublicId, kJSPropertyAttributeNone + }, + + + { + "getSystemId", _wrap_DOMDocumentType_getSystemId, kJSPropertyAttributeNone + }, + + + { + "getInternalSubset", _wrap_DOMDocumentType_getInternalSubset, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMDocumentType(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMDocumentType can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMCharacterData_classDefinition; + +static JSClassDefinition _exports_DOMCharacterData_objectDefinition; + +static JSClassRef _exports_DOMCharacterData_classRef; + + +static void _wrap_delete_DOMCharacterData(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMCharacterData * arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMCharacterData_getData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_getData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_getData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getData(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_getLength(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_getLength."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getLength(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_substringData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_substringData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_substringData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_substringData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_substringData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->substringData(arg2,arg3); + + jsresult = XMLString2JS(result, context); + + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_appendData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_appendData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_appendData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->appendData((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_insertData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_insertData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_insertData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_insertData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + + arg3 = JS2XMLString(argv[1], context); + + (arg1)->insertData(arg2,(XMLCh const *)arg3); + jsresult = JSValueMakeUndefined(context); + + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_deleteData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_deleteData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_deleteData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_deleteData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_deleteData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + (arg1)->deleteData(arg2,arg3); + jsresult = JSValueMakeUndefined(context); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_replaceData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + XMLCh *arg4 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_replaceData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_replaceData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_replaceData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_replaceData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + + arg4 = JS2XMLString(argv[2], context); + + (arg1)->replaceData(arg2,arg3,(XMLCh const *)arg4); + jsresult = JSValueMakeUndefined(context); + + + + + delete[] arg4; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_setData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_setData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_setData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setData((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMCharacterData_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCharacterData_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMCharacterData_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCharacterData_functions[] = { + { + "getData", _wrap_DOMCharacterData_getData, kJSPropertyAttributeNone + }, + + + { + "getLength", _wrap_DOMCharacterData_getLength, kJSPropertyAttributeNone + }, + + + { + "substringData", _wrap_DOMCharacterData_substringData, kJSPropertyAttributeNone + }, + + + { + "appendData", _wrap_DOMCharacterData_appendData, kJSPropertyAttributeNone + }, + + + { + "insertData", _wrap_DOMCharacterData_insertData, kJSPropertyAttributeNone + }, + + + { + "deleteData", _wrap_DOMCharacterData_deleteData, kJSPropertyAttributeNone + }, + + + { + "replaceData", _wrap_DOMCharacterData_replaceData, kJSPropertyAttributeNone + }, + + + { + "setData", _wrap_DOMCharacterData_setData, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMCharacterData(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMCharacterData can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMComment_classDefinition; + +static JSClassDefinition _exports_DOMComment_objectDefinition; + +static JSClassRef _exports_DOMComment_classRef; + + +static void _wrap_delete_DOMComment(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMComment * arg1 = (XERCES_CPP_NAMESPACE::DOMComment *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMComment_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMComment_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMComment_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMComment_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMComment(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMComment can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMText_classDefinition; + +static JSClassDefinition _exports_DOMText_objectDefinition; + +static JSClassRef _exports_DOMText_classRef; + + +static void _wrap_delete_DOMText(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMText * arg1 = (XERCES_CPP_NAMESPACE::DOMText *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMText_splitText(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_splitText."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_splitText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMText_splitText" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->splitText(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_getIsElementContentWhitespace(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_getIsElementContentWhitespace."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_getIsElementContentWhitespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getIsElementContentWhitespace(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_getWholeText(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_getWholeText."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_getWholeText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getWholeText(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_replaceWholeText(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_replaceWholeText."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_replaceWholeText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->replaceWholeText((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_isIgnorableWhitespace(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_isIgnorableWhitespace."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_isIgnorableWhitespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->isIgnorableWhitespace(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMText_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMText_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMText_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMText_functions[] = { + { + "splitText", _wrap_DOMText_splitText, kJSPropertyAttributeNone + }, + + + { + "getIsElementContentWhitespace", _wrap_DOMText_getIsElementContentWhitespace, kJSPropertyAttributeNone + }, + + + { + "getWholeText", _wrap_DOMText_getWholeText, kJSPropertyAttributeNone + }, + + + { + "replaceWholeText", _wrap_DOMText_replaceWholeText, kJSPropertyAttributeNone + }, + + + { + "isIgnorableWhitespace", _wrap_DOMText_isIgnorableWhitespace, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMText(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMText can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMCDATASection_classDefinition; + +static JSClassDefinition _exports_DOMCDATASection_objectDefinition; + +static JSClassRef _exports_DOMCDATASection_classRef; + + +static void _wrap_delete_DOMCDATASection(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMCDATASection * arg1 = (XERCES_CPP_NAMESPACE::DOMCDATASection *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMCDATASection_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCDATASection_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMCDATASection_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCDATASection_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMCDATASection(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMCDATASection can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMNodeList_classDefinition; + +static JSClassDefinition _exports_DOMNodeList_objectDefinition; + +static JSClassRef _exports_DOMNodeList_classRef; + + +static void _wrap_delete_DOMNodeList(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNodeList * arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMNodeList_item(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNodeList_item."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNodeList_item" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNodeList const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNodeList_item" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->item(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNodeList_getLength(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNodeList_getLength."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNodeList_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNodeList const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->getLength(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNodeList_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNodeList_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNodeList_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNodeList_functions[] = { + { + "item", _wrap_DOMNodeList_item, kJSPropertyAttributeNone + }, + + + { + "getLength", _wrap_DOMNodeList_getLength, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNodeList(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNodeList can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMNamedNodeMap_classDefinition; + +static JSClassDefinition _exports_DOMNamedNodeMap_objectDefinition; + +static JSClassRef _exports_DOMNamedNodeMap_classRef; + + +static void _wrap_delete_DOMNamedNodeMap(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNamedNodeMap * arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMNamedNodeMap_setNamedItem(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_setNamedItem."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_setNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNamedNodeMap_setNamedItem" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItem(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_item(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_item."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_item" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNamedNodeMap_item" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->item(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_getNamedItem(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getNamedItem."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItem((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_getLength(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getLength."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getLength(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_removeNamedItem(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_removeNamedItem."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_removeNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItem((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_getNamedItemNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getNamedItemNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_setNamedItemNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_setNamedItemNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_setNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNamedNodeMap_setNamedItemNS" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItemNS(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_removeNamedItemNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_removeNamedItemNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_removeNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNamedNodeMap_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNamedNodeMap_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNamedNodeMap_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNamedNodeMap_functions[] = { + { + "setNamedItem", _wrap_DOMNamedNodeMap_setNamedItem, kJSPropertyAttributeNone + }, + + + { + "item", _wrap_DOMNamedNodeMap_item, kJSPropertyAttributeNone + }, + + + { + "getNamedItem", _wrap_DOMNamedNodeMap_getNamedItem, kJSPropertyAttributeNone + }, + + + { + "getLength", _wrap_DOMNamedNodeMap_getLength, kJSPropertyAttributeNone + }, + + + { + "removeNamedItem", _wrap_DOMNamedNodeMap_removeNamedItem, kJSPropertyAttributeNone + }, + + + { + "getNamedItemNS", _wrap_DOMNamedNodeMap_getNamedItemNS, kJSPropertyAttributeNone + }, + + + { + "setNamedItemNS", _wrap_DOMNamedNodeMap_setNamedItemNS, kJSPropertyAttributeNone + }, + + + { + "removeNamedItemNS", _wrap_DOMNamedNodeMap_removeNamedItemNS, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNamedNodeMap(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNamedNodeMap can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMDocumentFragment_classDefinition; + +static JSClassDefinition _exports_DOMDocumentFragment_objectDefinition; + +static JSClassRef _exports_DOMDocumentFragment_classRef; + + +static void _wrap_delete_DOMDocumentFragment(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMDocumentFragment * arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentFragment *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMDocumentFragment_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentFragment_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMDocumentFragment_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentFragment_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMDocumentFragment(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMDocumentFragment can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMEntityReference_classDefinition; + +static JSClassDefinition _exports_DOMEntityReference_objectDefinition; + +static JSClassRef _exports_DOMEntityReference_classRef; + + +static void _wrap_delete_DOMEntityReference(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMEntityReference * arg1 = (XERCES_CPP_NAMESPACE::DOMEntityReference *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMEntityReference_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntityReference_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMEntityReference_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntityReference_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMEntityReference(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMEntityReference can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMNotation_classDefinition; + +static JSClassDefinition _exports_DOMNotation_objectDefinition; + +static JSClassRef _exports_DOMNotation_classRef; + + +static void _wrap_delete_DOMNotation(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNotation * arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMNotation_getPublicId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNotation_getPublicId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNotation_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNotation const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNotation_getSystemId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNotation_getSystemId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNotation_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNotation const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNotation_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNotation_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNotation_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNotation_functions[] = { + { + "getPublicId", _wrap_DOMNotation_getPublicId, kJSPropertyAttributeNone + }, + + + { + "getSystemId", _wrap_DOMNotation_getSystemId, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNotation(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNotation can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMProcessingInstruction_classDefinition; + +static JSClassDefinition _exports_DOMProcessingInstruction_objectDefinition; + +static JSClassRef _exports_DOMProcessingInstruction_classRef; + + +static void _wrap_delete_DOMProcessingInstruction(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMProcessingInstruction * arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMProcessingInstruction_getTarget(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_getTarget."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_getTarget" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getTarget(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMProcessingInstruction_getData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_getData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_getData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getData(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMProcessingInstruction_setData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_setData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_setData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setData((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMProcessingInstruction_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMProcessingInstruction_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMProcessingInstruction_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMProcessingInstruction_functions[] = { + { + "getTarget", _wrap_DOMProcessingInstruction_getTarget, kJSPropertyAttributeNone + }, + + + { + "getData", _wrap_DOMProcessingInstruction_getData, kJSPropertyAttributeNone + }, + + + { + "setData", _wrap_DOMProcessingInstruction_setData, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMProcessingInstruction(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMProcessingInstruction can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_Event_classDefinition; + +static JSClassDefinition _exports_Event_objectDefinition; + +static JSClassRef _exports_Event_classRef; + + +static JSValueRef _wrap_uscxml_Event_INTERNAL(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(uscxml::Event::INTERNAL)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_uscxml_Event_EXTERNAL(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(uscxml::Event::EXTERNAL)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_uscxml_Event_PLATFORM(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(uscxml::Event::PLATFORM)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSObjectRef _wrap_new_Event__SWIG_0(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::Event *result; + result = (uscxml::Event *)new uscxml::Event(); + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_Event__SWIG_1(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + std::string *arg1 = 0 ; + uscxml::Event::Type arg2 ; + int res1 = SWIG_OLDOBJ ; + int val2 ; + int ecode2 = 0 ; + uscxml::Event *result; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int SWIG_JSC_AS_CALL_ARGS(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "uscxml::Event::Type""'"); + } + arg2 = (uscxml::Event::Type)(val2); + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1,arg2); + + if (SWIG_IsNewObj(res1)) delete arg1; + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_Event__SWIG_2(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + uscxml::Event *result; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1); + + if (SWIG_IsNewObj(res1)) delete arg1; + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_Event(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSObjectRef thisObject = NULL; + + // switch all cases by means of series of if-returns. + + if(argc == 0) { + thisObject = _wrap_new_Event__SWIG_0(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 2) { + thisObject = _wrap_new_Event__SWIG_1(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 1) { + thisObject = _wrap_new_Event__SWIG_2(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of $jsname"); + +fail: + return thisObject; +} + + +static JSValueRef _wrap_Event_operator_equal_to(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_operator_equal_to."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_operator_equal_to" "', argument " "1"" of type '" "uscxml::Event const *""'"); + } + arg1 = (uscxml::Event *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uscxml__Event, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_operator_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_operator_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + arg2 = (uscxml::Event *)(argp2); + result = (bool)((uscxml::Event const *)arg1)->operator ==((uscxml::Event const &)*arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_Event_operator_not_equal_to(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_operator_not_equal_to."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_operator_not_equal_to" "', argument " "1"" of type '" "uscxml::Event const *""'"); + } + arg1 = (uscxml::Event *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uscxml__Event, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_operator_not_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_operator_not_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + arg2 = (uscxml::Event *)(argp2); + result = (bool)((uscxml::Event const *)arg1)->operator !=((uscxml::Event const &)*arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static int _wrap_Event_getParam__SWIG_0(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result) +{ + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + Data *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_getParam__SWIG_0."); + + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Data, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "Data &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "Data &""'"); + } + arg3 = (Data *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + *p_result = jsresult; + return SWIG_OK; + + goto fail; +fail: + return SWIG_TypeError; +} + + +static int _wrap_Event_getParam__SWIG_1(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result) +{ + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + std::list< Data > *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_getParam__SWIG_1."); + + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_std__listT_Data_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "std::list< Data > &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "std::list< Data > &""'"); + } + arg3 = (std::list< Data > *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + *p_result = jsresult; + return SWIG_OK; + + goto fail; +fail: + return SWIG_TypeError; +} + + +static int _wrap_Event_getParam__SWIG_3(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result) +{ + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + bool *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_getParam__SWIG_3."); + + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_bool, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "bool &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "bool &""'"); + } + arg3 = (bool *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + *p_result = jsresult; + return SWIG_OK; + + goto fail; +fail: + return SWIG_TypeError; +} + + +static JSValueRef _wrap_Event__wrap_Event_getParam(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + int res; + + if(argc == 3) { + res = _wrap_Event_getParam__SWIG_0(context, function, thisObject, argc, argv, exception, &jsresult); + if(res == SWIG_OK) { + *exception = 0; return jsresult; + } + } + + if(argc == 3) { + res = _wrap_Event_getParam__SWIG_1(context, function, thisObject, argc, argv, exception, &jsresult); + if(res == SWIG_OK) { + *exception = 0; return jsresult; + } + } + + if(argc == 3) { + res = _wrap_Event_getParam__SWIG_3(context, function, thisObject, argc, argv, exception, &jsresult); + if(res == SWIG_OK) { + *exception = 0; return jsresult; + } + } + + + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for function getParam."); + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_Event_raw_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_raw_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(value, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_raw_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_raw_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->raw = *arg2; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_Event_raw_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_raw_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (std::string *) & ((arg1)->raw); + jsresult = SWIG_From_std_string SWIG_JSC_FROM_CALL_ARGS((std::string)(*result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_Event_name_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_name_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(value, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_Event_name_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_name_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (std::string *) & ((arg1)->name); + jsresult = SWIG_From_std_string SWIG_JSC_FROM_CALL_ARGS((std::string)(*result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_Event_eventType_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event::Type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_eventType_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + ecode2 = SWIG_AsVal_int SWIG_JSC_AS_CALL_ARGS(value, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_eventType_set" "', argument " "2"" of type '" "uscxml::Event::Type""'"); + } + arg2 = (uscxml::Event::Type)(val2); + if (arg1) (arg1)->eventType = arg2; + + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_Event_eventType_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uscxml::Event::Type result; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_eventType_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (uscxml::Event::Type) ((arg1)->eventType); + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static void _wrap_delete_Event(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + uscxml::Event * arg1 = (uscxml::Event *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_Event_staticValues[] = { + { + "INTERNAL", _wrap_uscxml_Event_INTERNAL, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "EXTERNAL", _wrap_uscxml_Event_EXTERNAL, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "PLATFORM", _wrap_uscxml_Event_PLATFORM, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_Event_staticFunctions[] = { + { + "getParam", _wrap_Event__wrap_Event_getParam, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_Event_values[] = { + { + "raw", _wrap_Event_raw_get, _wrap_Event_raw_set, kJSPropertyAttributeNone + }, + + + { + "name", _wrap_Event_name_get, _wrap_Event_name_set, kJSPropertyAttributeNone + }, + + + { + "eventType", _wrap_Event_eventType_get, _wrap_Event_eventType_set, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_Event_functions[] = { + { + "operator_equal_to", _wrap_Event_operator_equal_to, kJSPropertyAttributeNone + }, + + + { + "operator_not_equal_to", _wrap_Event_operator_not_equal_to, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSClassDefinition _exports_ErrorEvent_classDefinition; + +static JSClassDefinition _exports_ErrorEvent_objectDefinition; + +static JSClassRef _exports_ErrorEvent_classRef; + + +static JSObjectRef _wrap_new_ErrorEvent__SWIG_0(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::ErrorEvent *result; + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent(); + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__ErrorEvent, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_ErrorEvent__SWIG_1(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + uscxml::ErrorEvent *result; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ErrorEvent" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ErrorEvent" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent((std::string const &)*arg1); + + if (SWIG_IsNewObj(res1)) delete arg1; + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__ErrorEvent, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_ErrorEvent(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSObjectRef thisObject = NULL; + + // switch all cases by means of series of if-returns. + + if(argc == 0) { + thisObject = _wrap_new_ErrorEvent__SWIG_0(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 1) { + thisObject = _wrap_new_ErrorEvent__SWIG_1(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of $jsname"); + +fail: + return thisObject; +} + + +static void _wrap_delete_ErrorEvent(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + uscxml::ErrorEvent * arg1 = (uscxml::ErrorEvent *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_ErrorEvent_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_ErrorEvent_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_ErrorEvent_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_ErrorEvent_functions[] = { + { + 0, 0, 0 + } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) (XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMElement *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentFragment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMAttr *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentType *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMCharacterData *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntity *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntityReference *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *)(XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMNotation *) x)); +} +static void *_p_uscxml__ErrorEventTo_p_uscxml__Event(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((uscxml::Event *) ((uscxml::ErrorEvent *) x)); +} +static swig_type_info _swigt__p_Data = {"_p_Data", "Data *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMAttr = {"_p_XERCES_CPP_NAMESPACE__DOMAttr", "XERCES_CPP_NAMESPACE::DOMAttr *|p_XERCES_CPP_NAMESPACE__DOMAttr", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection = {"_p_XERCES_CPP_NAMESPACE__DOMCDATASection", "p_XERCES_CPP_NAMESPACE__DOMCDATASection", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData = {"_p_XERCES_CPP_NAMESPACE__DOMCharacterData", "XERCES_CPP_NAMESPACE::DOMCharacterData *|p_XERCES_CPP_NAMESPACE__DOMCharacterData", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMComment = {"_p_XERCES_CPP_NAMESPACE__DOMComment", "p_XERCES_CPP_NAMESPACE__DOMComment", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocument = {"_p_XERCES_CPP_NAMESPACE__DOMDocument", "XERCES_CPP_NAMESPACE::DOMDocument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment", "p_XERCES_CPP_NAMESPACE__DOMDocumentFragment", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentType", "XERCES_CPP_NAMESPACE::DOMDocumentType *|p_XERCES_CPP_NAMESPACE__DOMDocumentType", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMElement = {"_p_XERCES_CPP_NAMESPACE__DOMElement", "p_XERCES_CPP_NAMESPACE__DOMElement|XERCES_CPP_NAMESPACE::DOMElement *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntity = {"_p_XERCES_CPP_NAMESPACE__DOMEntity", "XERCES_CPP_NAMESPACE::DOMEntity *|p_XERCES_CPP_NAMESPACE__DOMEntity", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference = {"_p_XERCES_CPP_NAMESPACE__DOMEntityReference", "p_XERCES_CPP_NAMESPACE__DOMEntityReference", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMException = {"_p_XERCES_CPP_NAMESPACE__DOMException", "p_XERCES_CPP_NAMESPACE__DOMException|XERCES_CPP_NAMESPACE::DOMException *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap = {"_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap", "p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap|XERCES_CPP_NAMESPACE::DOMNamedNodeMap *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNode = {"_p_XERCES_CPP_NAMESPACE__DOMNode", "XERCES_CPP_NAMESPACE::DOMNode *|p_XERCES_CPP_NAMESPACE__DOMNode", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList = {"_p_XERCES_CPP_NAMESPACE__DOMNodeList", "p_XERCES_CPP_NAMESPACE__DOMNodeList|XERCES_CPP_NAMESPACE::DOMNodeList *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNotation = {"_p_XERCES_CPP_NAMESPACE__DOMNotation", "XERCES_CPP_NAMESPACE::DOMNotation *|p_XERCES_CPP_NAMESPACE__DOMNotation", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction = {"_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction", "XERCES_CPP_NAMESPACE::DOMProcessingInstruction *|p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMText = {"_p_XERCES_CPP_NAMESPACE__DOMText", "XERCES_CPP_NAMESPACE::DOMText *|p_XERCES_CPP_NAMESPACE__DOMText", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo = {"_p_XERCES_CPP_NAMESPACE__DOMTypeInfo", "XERCES_CPP_NAMESPACE::DOMTypeInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler = {"_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler", "XERCES_CPP_NAMESPACE::DOMUserDataHandler *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__MemoryManager = {"_p_XERCES_CPP_NAMESPACE__MemoryManager", "XERCES_CPP_NAMESPACE::MemoryManager *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int16_t = {"_p_int16_t", "XMLInt16 *|int16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int32_t = {"_p_int32_t", "int32_t *|XMLInt32 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *|XMLInt64 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_namelist_t = {"_p_namelist_t", "namelist_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_params_t = {"_p_params_t", "params_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *|XMLSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ssize_t = {"_p_ssize_t", "ssize_t *|XMLSSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Data_t = {"_p_std__listT_Data_t", "std::list< Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__multimapT_std__string_Data_t = {"_p_std__multimapT_std__string_Data_t", "uscxml::Event::params_t *|std::multimap< std::string,Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint16_t = {"_p_uint16_t", "XMLUInt16 *|UTF16Ch *|XMLCh *|uint16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *|XMLUInt32 *|UCS4Ch *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint64_t = {"_p_uint64_t", "uint64_t *|XMLUInt64 *|XMLFilePos *|XMLFileLoc *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|XMLByte *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uscxml__ErrorEvent = {"_p_uscxml__ErrorEvent", "p_uscxml__ErrorEvent", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uscxml__Event = {"_p_uscxml__Event", "uscxml::Event *|p_uscxml__Event", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_Data, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMException, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMText, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + &_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, + &_swigt__p_bool, + &_swigt__p_char, + &_swigt__p_int16_t, + &_swigt__p_int32_t, + &_swigt__p_int64_t, + &_swigt__p_namelist_t, + &_swigt__p_params_t, + &_swigt__p_size_t, + &_swigt__p_ssize_t, + &_swigt__p_std__listT_Data_t, + &_swigt__p_std__multimapT_std__string_Data_t, + &_swigt__p_uint16_t, + &_swigt__p_uint32_t, + &_swigt__p_uint64_t, + &_swigt__p_unsigned_char, + &_swigt__p_uscxml__ErrorEvent, + &_swigt__p_uscxml__Event, + &_swigt__p_void, +}; + +static swig_cast_info _swigc__p_Data[] = { {&_swigt__p_Data, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMComment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMElement[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMException[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNode[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, _p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, _p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, _p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, _p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, _p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, _p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, _p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, _p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, _p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMText[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int16_t[] = { {&_swigt__p_int16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int32_t[] = { {&_swigt__p_int32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int64_t[] = { {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_namelist_t[] = { {&_swigt__p_namelist_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_params_t[] = { {&_swigt__p_params_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ssize_t[] = { {&_swigt__p_ssize_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Data_t[] = { {&_swigt__p_std__listT_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__multimapT_std__string_Data_t[] = { {&_swigt__p_std__multimapT_std__string_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint16_t[] = { {&_swigt__p_uint16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint64_t[] = { {&_swigt__p_uint64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__ErrorEvent[] = { {&_swigt__p_uscxml__ErrorEvent, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__Event[] = { {&_swigt__p_uscxml__Event, 0, 0, 0}, {&_swigt__p_uscxml__ErrorEvent, _p_uscxml__ErrorEventTo_p_uscxml__Event, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_Data, + _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + _swigc__p_XERCES_CPP_NAMESPACE__DOMComment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + _swigc__p_XERCES_CPP_NAMESPACE__DOMElement, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + _swigc__p_XERCES_CPP_NAMESPACE__DOMException, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNode, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation, + _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + _swigc__p_XERCES_CPP_NAMESPACE__DOMText, + _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager, + _swigc__p_bool, + _swigc__p_char, + _swigc__p_int16_t, + _swigc__p_int32_t, + _swigc__p_int64_t, + _swigc__p_namelist_t, + _swigc__p_params_t, + _swigc__p_size_t, + _swigc__p_ssize_t, + _swigc__p_std__listT_Data_t, + _swigc__p_std__multimapT_std__string_Data_t, + _swigc__p_uint16_t, + _swigc__p_uint32_t, + _swigc__p_uint64_t, + _swigc__p_unsigned_char, + _swigc__p_uscxml__ErrorEvent, + _swigc__p_uscxml__Event, + _swigc__p_void, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + + + +static JSStaticValue exports_values[] = { + { + "XERCES_HAS_CPP_NAMESPACE", _wrap_XERCES_HAS_CPP_NAMESPACE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DEBUG_UTF8_OUT", _wrap_DEBUG_UTF8_OUT_get, _wrap_DEBUG_UTF8_OUT_set, kJSPropertyAttributeNone + }, + + + { + "DEBUG_UTF8_IN", _wrap_DEBUG_UTF8_IN_get, _wrap_DEBUG_UTF8_IN_set, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction exports_functions[] = { + { + 0, 0, 0 + } +}; + +static JSClassDefinition exports_classDefinition; +static JSObjectRef exports_object; + + +SWIGRUNTIME void +SWIG_JSC_SetModule(swig_module_info *swig_module) {} + +SWIGRUNTIME swig_module_info * +SWIG_JSC_GetModule(void) { + return 0; +} + +#define SWIG_GetModule(clientdata) SWIG_JSC_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_JSC_SetModule(pointer) + +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + +bool SWIGJSC_INIT (JSGlobalContextRef context, JSObjectRef *exports) { + SWIG_InitializeModule(0); + + + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->dcast = (swig_dycast_func) DOMNode_dynamic_cast; + + +/* Initialize the base swig type object */ +_SwigObject_objectDefinition.staticFunctions = _SwigObject_functions; +_SwigObject_objectDefinition.staticValues = _SwigObject_values; +_SwigObject_classRef = JSClassCreate(&_SwigObject_objectDefinition); + +/* Initialize the PackedData class */ +_SwigPackedData_objectDefinition.staticFunctions = _SwigPackedData_functions; +_SwigPackedData_objectDefinition.staticValues = _SwigPackedData_values; +_SwigPackedData_objectDefinition.finalize = _wrap_SwigPackedData_delete; +_SwigPackedData_classRef = JSClassCreate(&_SwigPackedData_objectDefinition); + +/* Create objects for namespaces */ + +exports_classDefinition.staticFunctions = exports_functions; +exports_classDefinition.staticValues = exports_values; +exports_object = JSObjectMake(context, JSClassCreate(&exports_classDefinition), NULL); + + +/* Register classes */ + +_exports_DOMException_classDefinition.staticFunctions = _exports_DOMException_staticFunctions; +_exports_DOMException_classDefinition.staticValues = _exports_DOMException_staticValues; +_exports_DOMException_classDefinition.callAsConstructor = _wrap_new_DOMException; +_exports_DOMException_objectDefinition.finalize = _wrap_delete_DOMException; +_exports_DOMException_objectDefinition.staticValues = _exports_DOMException_values; +_exports_DOMException_objectDefinition.staticFunctions = _exports_DOMException_functions; + +_exports_DOMException_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMException_classRef = JSClassCreate(&_exports_DOMException_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException->clientdata = _exports_DOMException_classRef; + + +JS_registerClass(context, exports_object, "DOMException", &_exports_DOMException_classDefinition); + + +_exports_DOMNode_classDefinition.staticFunctions = _exports_DOMNode_staticFunctions; +_exports_DOMNode_classDefinition.staticValues = _exports_DOMNode_staticValues; +_exports_DOMNode_classDefinition.callAsConstructor = _wrap_new_veto_DOMNode; +_exports_DOMNode_objectDefinition.finalize = _wrap_delete_DOMNode; +_exports_DOMNode_objectDefinition.staticValues = _exports_DOMNode_values; +_exports_DOMNode_objectDefinition.staticFunctions = _exports_DOMNode_functions; + +_exports_DOMNode_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMNode_classRef = JSClassCreate(&_exports_DOMNode_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata = _exports_DOMNode_classRef; + + +JS_registerClass(context, exports_object, "DOMNode", &_exports_DOMNode_classDefinition); + + +_exports_DOMAttr_classDefinition.staticFunctions = _exports_DOMAttr_staticFunctions; +_exports_DOMAttr_classDefinition.staticValues = _exports_DOMAttr_staticValues; +_exports_DOMAttr_classDefinition.callAsConstructor = _wrap_new_veto_DOMAttr; +_exports_DOMAttr_objectDefinition.finalize = _wrap_delete_DOMAttr; +_exports_DOMAttr_objectDefinition.staticValues = _exports_DOMAttr_values; +_exports_DOMAttr_objectDefinition.staticFunctions = _exports_DOMAttr_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMAttr_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMAttr_classRef = JSClassCreate(&_exports_DOMAttr_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr->clientdata = _exports_DOMAttr_classRef; + + +JS_registerClass(context, exports_object, "DOMAttr", &_exports_DOMAttr_classDefinition); + + +_exports_DOMElement_classDefinition.staticFunctions = _exports_DOMElement_staticFunctions; +_exports_DOMElement_classDefinition.staticValues = _exports_DOMElement_staticValues; +_exports_DOMElement_classDefinition.callAsConstructor = _wrap_new_veto_DOMElement; +_exports_DOMElement_objectDefinition.finalize = _wrap_delete_DOMElement; +_exports_DOMElement_objectDefinition.staticValues = _exports_DOMElement_values; +_exports_DOMElement_objectDefinition.staticFunctions = _exports_DOMElement_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMElement_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMElement_classRef = JSClassCreate(&_exports_DOMElement_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement->clientdata = _exports_DOMElement_classRef; + + +JS_registerClass(context, exports_object, "DOMElement", &_exports_DOMElement_classDefinition); + + +_exports_DOMEntity_classDefinition.staticFunctions = _exports_DOMEntity_staticFunctions; +_exports_DOMEntity_classDefinition.staticValues = _exports_DOMEntity_staticValues; +_exports_DOMEntity_classDefinition.callAsConstructor = _wrap_new_veto_DOMEntity; +_exports_DOMEntity_objectDefinition.finalize = _wrap_delete_DOMEntity; +_exports_DOMEntity_objectDefinition.staticValues = _exports_DOMEntity_values; +_exports_DOMEntity_objectDefinition.staticFunctions = _exports_DOMEntity_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMEntity_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMEntity_classRef = JSClassCreate(&_exports_DOMEntity_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity->clientdata = _exports_DOMEntity_classRef; + + +JS_registerClass(context, exports_object, "DOMEntity", &_exports_DOMEntity_classDefinition); + + +_exports_DOMDocumentType_classDefinition.staticFunctions = _exports_DOMDocumentType_staticFunctions; +_exports_DOMDocumentType_classDefinition.staticValues = _exports_DOMDocumentType_staticValues; +_exports_DOMDocumentType_classDefinition.callAsConstructor = _wrap_new_veto_DOMDocumentType; +_exports_DOMDocumentType_objectDefinition.finalize = _wrap_delete_DOMDocumentType; +_exports_DOMDocumentType_objectDefinition.staticValues = _exports_DOMDocumentType_values; +_exports_DOMDocumentType_objectDefinition.staticFunctions = _exports_DOMDocumentType_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMDocumentType_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMDocumentType_classRef = JSClassCreate(&_exports_DOMDocumentType_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType->clientdata = _exports_DOMDocumentType_classRef; + + +JS_registerClass(context, exports_object, "DOMDocumentType", &_exports_DOMDocumentType_classDefinition); + + +_exports_DOMCharacterData_classDefinition.staticFunctions = _exports_DOMCharacterData_staticFunctions; +_exports_DOMCharacterData_classDefinition.staticValues = _exports_DOMCharacterData_staticValues; +_exports_DOMCharacterData_classDefinition.callAsConstructor = _wrap_new_veto_DOMCharacterData; +_exports_DOMCharacterData_objectDefinition.finalize = _wrap_delete_DOMCharacterData; +_exports_DOMCharacterData_objectDefinition.staticValues = _exports_DOMCharacterData_values; +_exports_DOMCharacterData_objectDefinition.staticFunctions = _exports_DOMCharacterData_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMCharacterData_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMCharacterData_classRef = JSClassCreate(&_exports_DOMCharacterData_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata = _exports_DOMCharacterData_classRef; + + +JS_registerClass(context, exports_object, "DOMCharacterData", &_exports_DOMCharacterData_classDefinition); + + +_exports_DOMComment_classDefinition.staticFunctions = _exports_DOMComment_staticFunctions; +_exports_DOMComment_classDefinition.staticValues = _exports_DOMComment_staticValues; +_exports_DOMComment_classDefinition.callAsConstructor = _wrap_new_veto_DOMComment; +_exports_DOMComment_objectDefinition.finalize = _wrap_delete_DOMComment; +_exports_DOMComment_objectDefinition.staticValues = _exports_DOMComment_values; +_exports_DOMComment_objectDefinition.staticFunctions = _exports_DOMComment_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData != NULL) { + _exports_DOMComment_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata; +} + + +_exports_DOMComment_classRef = JSClassCreate(&_exports_DOMComment_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment->clientdata = _exports_DOMComment_classRef; + + +JS_registerClass(context, exports_object, "DOMComment", &_exports_DOMComment_classDefinition); + + +_exports_DOMText_classDefinition.staticFunctions = _exports_DOMText_staticFunctions; +_exports_DOMText_classDefinition.staticValues = _exports_DOMText_staticValues; +_exports_DOMText_classDefinition.callAsConstructor = _wrap_new_veto_DOMText; +_exports_DOMText_objectDefinition.finalize = _wrap_delete_DOMText; +_exports_DOMText_objectDefinition.staticValues = _exports_DOMText_values; +_exports_DOMText_objectDefinition.staticFunctions = _exports_DOMText_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData != NULL) { + _exports_DOMText_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata; +} + + +_exports_DOMText_classRef = JSClassCreate(&_exports_DOMText_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata = _exports_DOMText_classRef; + + +JS_registerClass(context, exports_object, "DOMText", &_exports_DOMText_classDefinition); + + +_exports_DOMCDATASection_classDefinition.staticFunctions = _exports_DOMCDATASection_staticFunctions; +_exports_DOMCDATASection_classDefinition.staticValues = _exports_DOMCDATASection_staticValues; +_exports_DOMCDATASection_classDefinition.callAsConstructor = _wrap_new_veto_DOMCDATASection; +_exports_DOMCDATASection_objectDefinition.finalize = _wrap_delete_DOMCDATASection; +_exports_DOMCDATASection_objectDefinition.staticValues = _exports_DOMCDATASection_values; +_exports_DOMCDATASection_objectDefinition.staticFunctions = _exports_DOMCDATASection_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText != NULL) { + _exports_DOMCDATASection_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata; +} + + +_exports_DOMCDATASection_classRef = JSClassCreate(&_exports_DOMCDATASection_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection->clientdata = _exports_DOMCDATASection_classRef; + + +JS_registerClass(context, exports_object, "DOMCDATASection", &_exports_DOMCDATASection_classDefinition); + + +_exports_DOMNodeList_classDefinition.staticFunctions = _exports_DOMNodeList_staticFunctions; +_exports_DOMNodeList_classDefinition.staticValues = _exports_DOMNodeList_staticValues; +_exports_DOMNodeList_classDefinition.callAsConstructor = _wrap_new_veto_DOMNodeList; +_exports_DOMNodeList_objectDefinition.finalize = _wrap_delete_DOMNodeList; +_exports_DOMNodeList_objectDefinition.staticValues = _exports_DOMNodeList_values; +_exports_DOMNodeList_objectDefinition.staticFunctions = _exports_DOMNodeList_functions; + +_exports_DOMNodeList_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMNodeList_classRef = JSClassCreate(&_exports_DOMNodeList_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList->clientdata = _exports_DOMNodeList_classRef; + + +JS_registerClass(context, exports_object, "DOMNodeList", &_exports_DOMNodeList_classDefinition); + + +_exports_DOMNamedNodeMap_classDefinition.staticFunctions = _exports_DOMNamedNodeMap_staticFunctions; +_exports_DOMNamedNodeMap_classDefinition.staticValues = _exports_DOMNamedNodeMap_staticValues; +_exports_DOMNamedNodeMap_classDefinition.callAsConstructor = _wrap_new_veto_DOMNamedNodeMap; +_exports_DOMNamedNodeMap_objectDefinition.finalize = _wrap_delete_DOMNamedNodeMap; +_exports_DOMNamedNodeMap_objectDefinition.staticValues = _exports_DOMNamedNodeMap_values; +_exports_DOMNamedNodeMap_objectDefinition.staticFunctions = _exports_DOMNamedNodeMap_functions; + +_exports_DOMNamedNodeMap_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMNamedNodeMap_classRef = JSClassCreate(&_exports_DOMNamedNodeMap_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap->clientdata = _exports_DOMNamedNodeMap_classRef; + + +JS_registerClass(context, exports_object, "DOMNamedNodeMap", &_exports_DOMNamedNodeMap_classDefinition); + + +_exports_DOMDocumentFragment_classDefinition.staticFunctions = _exports_DOMDocumentFragment_staticFunctions; +_exports_DOMDocumentFragment_classDefinition.staticValues = _exports_DOMDocumentFragment_staticValues; +_exports_DOMDocumentFragment_classDefinition.callAsConstructor = _wrap_new_veto_DOMDocumentFragment; +_exports_DOMDocumentFragment_objectDefinition.finalize = _wrap_delete_DOMDocumentFragment; +_exports_DOMDocumentFragment_objectDefinition.staticValues = _exports_DOMDocumentFragment_values; +_exports_DOMDocumentFragment_objectDefinition.staticFunctions = _exports_DOMDocumentFragment_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMDocumentFragment_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMDocumentFragment_classRef = JSClassCreate(&_exports_DOMDocumentFragment_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment->clientdata = _exports_DOMDocumentFragment_classRef; + + +JS_registerClass(context, exports_object, "DOMDocumentFragment", &_exports_DOMDocumentFragment_classDefinition); + + +_exports_DOMEntityReference_classDefinition.staticFunctions = _exports_DOMEntityReference_staticFunctions; +_exports_DOMEntityReference_classDefinition.staticValues = _exports_DOMEntityReference_staticValues; +_exports_DOMEntityReference_classDefinition.callAsConstructor = _wrap_new_veto_DOMEntityReference; +_exports_DOMEntityReference_objectDefinition.finalize = _wrap_delete_DOMEntityReference; +_exports_DOMEntityReference_objectDefinition.staticValues = _exports_DOMEntityReference_values; +_exports_DOMEntityReference_objectDefinition.staticFunctions = _exports_DOMEntityReference_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMEntityReference_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMEntityReference_classRef = JSClassCreate(&_exports_DOMEntityReference_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference->clientdata = _exports_DOMEntityReference_classRef; + + +JS_registerClass(context, exports_object, "DOMEntityReference", &_exports_DOMEntityReference_classDefinition); + + +_exports_DOMNotation_classDefinition.staticFunctions = _exports_DOMNotation_staticFunctions; +_exports_DOMNotation_classDefinition.staticValues = _exports_DOMNotation_staticValues; +_exports_DOMNotation_classDefinition.callAsConstructor = _wrap_new_veto_DOMNotation; +_exports_DOMNotation_objectDefinition.finalize = _wrap_delete_DOMNotation; +_exports_DOMNotation_objectDefinition.staticValues = _exports_DOMNotation_values; +_exports_DOMNotation_objectDefinition.staticFunctions = _exports_DOMNotation_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMNotation_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMNotation_classRef = JSClassCreate(&_exports_DOMNotation_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation->clientdata = _exports_DOMNotation_classRef; + + +JS_registerClass(context, exports_object, "DOMNotation", &_exports_DOMNotation_classDefinition); + + +_exports_DOMProcessingInstruction_classDefinition.staticFunctions = _exports_DOMProcessingInstruction_staticFunctions; +_exports_DOMProcessingInstruction_classDefinition.staticValues = _exports_DOMProcessingInstruction_staticValues; +_exports_DOMProcessingInstruction_classDefinition.callAsConstructor = _wrap_new_veto_DOMProcessingInstruction; +_exports_DOMProcessingInstruction_objectDefinition.finalize = _wrap_delete_DOMProcessingInstruction; +_exports_DOMProcessingInstruction_objectDefinition.staticValues = _exports_DOMProcessingInstruction_values; +_exports_DOMProcessingInstruction_objectDefinition.staticFunctions = _exports_DOMProcessingInstruction_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMProcessingInstruction_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMProcessingInstruction_classRef = JSClassCreate(&_exports_DOMProcessingInstruction_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction->clientdata = _exports_DOMProcessingInstruction_classRef; + + +JS_registerClass(context, exports_object, "DOMProcessingInstruction", &_exports_DOMProcessingInstruction_classDefinition); + + +_exports_Event_classDefinition.staticFunctions = _exports_Event_staticFunctions; +_exports_Event_classDefinition.staticValues = _exports_Event_staticValues; +_exports_Event_classDefinition.callAsConstructor = _wrap_new_Event; +_exports_Event_objectDefinition.finalize = _wrap_delete_Event; +_exports_Event_objectDefinition.staticValues = _exports_Event_values; +_exports_Event_objectDefinition.staticFunctions = _exports_Event_functions; + +_exports_Event_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_Event_classRef = JSClassCreate(&_exports_Event_objectDefinition); +SWIGTYPE_p_uscxml__Event->clientdata = _exports_Event_classRef; + + +JS_registerClass(context, exports_object, "Event", &_exports_Event_classDefinition); + + +_exports_ErrorEvent_classDefinition.staticFunctions = _exports_ErrorEvent_staticFunctions; +_exports_ErrorEvent_classDefinition.staticValues = _exports_ErrorEvent_staticValues; +_exports_ErrorEvent_classDefinition.callAsConstructor = _wrap_new_ErrorEvent; +_exports_ErrorEvent_objectDefinition.finalize = _wrap_delete_ErrorEvent; +_exports_ErrorEvent_objectDefinition.staticValues = _exports_ErrorEvent_values; +_exports_ErrorEvent_objectDefinition.staticFunctions = _exports_ErrorEvent_functions; + +if (SWIGTYPE_p_uscxml__Event != NULL) { + _exports_ErrorEvent_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_uscxml__Event->clientdata; +} + + +_exports_ErrorEvent_classRef = JSClassCreate(&_exports_ErrorEvent_objectDefinition); +SWIGTYPE_p_uscxml__ErrorEvent->clientdata = _exports_ErrorEvent_classRef; + + +JS_registerClass(context, exports_object, "ErrorEvent", &_exports_ErrorEvent_classDefinition); + + + +/* Register namespaces */ + + +*exports = exports_object; + +return true; +} +#ifdef __cplusplus +} +#endif + diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h deleted file mode 100644 index 0b49c92..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCDOM_H_1RC5LCG8 -#define JSCDOM_H_1RC5LCG8 - -#include "uscxml/InterpreterInfo.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include <XPath/XPath.hpp> -#include "../Storage.h" - -#define JSC_DESTRUCTOR(type) \ -static void jsDestructor(JSObjectRef object) { \ - type* thing = static_cast<type*>(JSObjectGetPrivate(object)); \ - if (thing) {\ - delete thing->nativeObj; \ - delete thing; \ - JSObjectSetPrivate(object, NULL);\ - }\ -} - -#define JSC_DESTRUCTOR_KEEP_WRAPPED(type) \ -static void jsDestructor(JSObjectRef object) { \ -type* thing = static_cast<type*>(JSObjectGetPrivate(object)); \ -delete thing; \ -} - -namespace Arabica { -namespace DOM { - -class JSCDOM { -public: - JSCDOM(); - virtual ~JSCDOM(); - uscxml::Storage* storage; - uscxml::NameSpaceInfo* nsInfo; - Arabica::XPath::XPath<std::string>* xpath; - -}; - -} -} - -#endif /* end of include guard: JSCDOM_H_1RC5LCG8 */ diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp index d3eb0ef..d43efbe 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp @@ -18,55 +18,66 @@ */ #include "uscxml/Common.h" -#include "uscxml/config.h" -#include "uscxml/URL.h" +#include "uscxml/util/URL.h" #include "uscxml/util/String.h" #include "JSCDataModel.h" -#include "JSCDOM.h" -#include "dom/JSCDocument.h" -#include "dom/JSCElement.h" -#include "dom/JSCText.h" -#include "dom/JSCCDATASection.h" -#include "dom/JSCSCXMLEvent.h" - -#include "dom/JSCArrayBuffer.h" -#include "dom/JSCInt8Array.h" -#include "dom/JSCUint8Array.h" -#include "dom/JSCUint8ClampedArray.h" -#include "dom/JSCInt16Array.h" -#include "dom/JSCUint16Array.h" -#include "dom/JSCInt32Array.h" -#include "dom/JSCUint32Array.h" -#include "dom/JSCFloat32Array.h" -#include "dom/JSCFloat64Array.h" -#include "dom/JSCDataView.h" - -#include "uscxml/Message.h" -#include "uscxml/dom/DOMUtils.h" -#include <glog/logging.h> +//#include "JSCSCXMLEvent.h" -#ifdef BUILD_AS_PLUGINS -#include <Pluma/Connector.hpp> -#endif +#include "uscxml/messages/Event.h" +#include "uscxml/util/DOM.h" +#include <easylogging++.h> -#define TO_JSC_DOMVALUE(type) \ -struct JSC##type::JSC##type##Private* privData = new JSC##type::JSC##type##Private(); \ -privData->dom = _dom; \ -privData->nativeObj = new type<std::string>(node); \ -JSObjectRef retObj = JSObjectMake(_ctx, JSC##type::getTmpl(), privData);\ -return retObj; +#define EVENT_STRING_OR_UNDEF(field, cond) \ +JSStringRef field##Name = JSStringCreateWithUTF8CString( #field ); \ +JSStringRef field##Val = JSStringCreateWithUTF8CString(event.field.c_str()); \ +JSObjectSetProperty(_ctx, \ + eventObj, \ + field##Name, \ + (cond ? JSValueMakeString(_ctx, field##Val) : JSValueMakeUndefined(_ctx)), \ + 0, \ + &exception); \ +JSStringRelease(field##Name); \ +JSStringRelease(field##Val); \ +if (exception) \ + handleException(exception); -#define JSC_ADD_GLOBAL_OBJECT(name, constructor)\ -JSStringRef name##Name = JSStringCreateWithUTF8CString(#name);\ -JSObjectRef name = JSObjectMake(dm->_ctx, constructor, NULL);\ -JSObjectSetProperty(dm->_ctx, JSContextGetGlobalObject(dm->_ctx), name##Name, name, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL);\ -JSStringRelease(name##Name); -namespace uscxml { +using namespace xercesc; + +static JSValueRef XMLString2JS(const XMLCh* input, JSContextRef context) { + JSValueRef output; + + char* res = xercesc::XMLString::transcode(input); + + JSStringRef stringRef = JSStringCreateWithUTF8CString(res); + output = JSValueMakeString(context, stringRef); + JSStringRelease(stringRef); + + return output; +} + +static XMLCh* JS2XMLString(JSValueRef input, JSContextRef context) { + + if (!JSValueIsString(context, input)) + return NULL; + + JSValueRef exception = NULL; + JSStringRef stringInput = JSValueToStringCopy(context, input, &exception); + + // TODO: I am leaking! + size_t maxSize = JSStringGetMaximumUTF8CStringSize(stringInput); + char* output = new char[maxSize + 1]; + + JSStringGetUTF8CString(stringInput, output, maxSize); + XMLCh* ret = xercesc::XMLString::transcode(output); -using namespace Arabica::XPath; -using namespace Arabica::DOM; + return(ret); +} + +#include "JSCDOM.cpp.inc" + +namespace uscxml { #ifdef BUILD_AS_PLUGINS PLUMA_CONNECTOR @@ -77,13 +88,10 @@ bool pluginConnect(pluma::Host& host) { #endif JSCDataModel::JSCDataModel() { - _dom = NULL; _ctx = NULL; } JSCDataModel::~JSCDataModel() { - if (_dom) - delete _dom; if (_ctx) JSGlobalContextRelease(_ctx); } @@ -159,31 +167,6 @@ JSValueRef JSCDataModel::jsExtension(JSContextRef ctx, JSObjectRef function, JSO return JSValueMakeNull(ctx); } -#if 0 -typedef struct { - int version; /* current (and only) version is 0 */ - JSClassAttributes attributes; - - const char* className; - JSClassRef parentClass; - - const JSStaticValue* staticValues; - const JSStaticFunction* staticFunctions; - - JSObjectInitializeCallback initialize; - JSObjectFinalizeCallback finalize; - JSObjectHasPropertyCallback hasProperty; - JSObjectGetPropertyCallback getProperty; - JSObjectSetPropertyCallback setProperty; - JSObjectDeletePropertyCallback deleteProperty; - JSObjectGetPropertyNamesCallback getPropertyNames; - JSObjectCallAsFunctionCallback callAsFunction; - JSObjectCallAsConstructorCallback callAsConstructor; - JSObjectHasInstanceCallback hasInstance; - JSObjectConvertToTypeCallback convertToType; -} JSClassDefinition; -#endif - // functions need to be objects to hold private data in JSC JSClassDefinition JSCDataModel::jsInClassDef = { 0, 0, "In", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, jsIn, 0, 0, 0 }; JSClassDefinition JSCDataModel::jsPrintClassDef = { 0, 0, "print", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, jsPrint, 0, 0, 0 }; @@ -192,17 +175,74 @@ JSClassDefinition JSCDataModel::jsExtensionClassDef = { 0, 0, "Extension", 0, 0, JSClassDefinition JSCDataModel::jsIOProcessorsClassDef = { 0, 0, "ioProcessors", 0, 0, 0, 0, 0, jsIOProcessorHasProp, jsIOProcessorGetProp, 0, 0, jsIOProcessorListProps, 0, 0, 0, 0 }; JSClassDefinition JSCDataModel::jsInvokersClassDef = { 0, 0, "invokers", 0, 0, 0, 0, 0, jsInvokerHasProp, jsInvokerGetProp, 0, 0, jsInvokerListProps, 0, 0, 0, 0 }; -boost::shared_ptr<DataModelImpl> JSCDataModel::create(InterpreterInfo* interpreter) { - boost::shared_ptr<JSCDataModel> dm = boost::shared_ptr<JSCDataModel>(new JSCDataModel()); +std::mutex JSCDataModel::_initMutex; + +bool JSCNodeListHasPropertyCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { + size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); + char* propBuffer = new char[propMaxSize]; + JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); + std::string propName(propBuffer); + free(propBuffer); + + std::string base = "0123456789"; + if (propName.find_first_not_of(base) != std::string::npos) { + return false; + } + + int index = strTo<int>(propName); + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(object); + DOMNodeList* nodeList = (DOMNodeList*)t->swigCObject; + + if (nodeList->getLength() < index) { + return false; + } + + return true; +} + +JSValueRef JSCNodeListGetPropertyCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { + size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); + char* propBuffer = new char[propMaxSize]; + JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); + std::string propName(propBuffer); + free(propBuffer); + + std::string base = "0123456789"; + if (propName.find_first_not_of(base) != std::string::npos) { + return JSValueMakeUndefined(context); + } + + int index = strTo<int>(propName); + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(object); + DOMNodeList* nodeList = (DOMNodeList*)t->swigCObject; + + if (nodeList->getLength() < index) { + return JSValueMakeUndefined(context); + } + + DOMNode* node = nodeList->item(index); + JSValueRef jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(node), + SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&node)), 0); + return jsresult; +} + +std::shared_ptr<DataModelImpl> JSCDataModel::create(DataModelCallbacks* callbacks) { + std::shared_ptr<JSCDataModel> dm(new JSCDataModel()); dm->_ctx = JSGlobalContextCreate(NULL); - dm->_interpreter = interpreter; + dm->_callbacks = callbacks; + + JSObjectRef exports; - dm->_dom = new JSCDOM(); - dm->_dom->xpath = new XPath<std::string>(); - dm->_dom->xpath->setNamespaceContext(*interpreter->getNameSpaceInfo().getNSContext()); - dm->_dom->storage = new Storage(URL::getResourceDir() + PATH_SEPERATOR + interpreter->getName() + ".storage"); - dm->_dom->nsInfo = new NameSpaceInfo(interpreter->getNameSpaceInfo()); + // register subscript operator with nodelist + _exports_DOMNodeList_objectDefinition.hasProperty = JSCNodeListHasPropertyCallback; + _exports_DOMNodeList_objectDefinition.getProperty = JSCNodeListGetPropertyCallback; + + // not thread safe! + { + std::lock_guard<std::mutex> lock(_initMutex); + JSCDOM_initialize(dm->_ctx, &exports); + } // introduce global functions as objects for private data JSClassRef jsInClassRef = JSClassCreate(&jsInClassDef); @@ -230,76 +270,68 @@ boost::shared_ptr<DataModelImpl> JSCDataModel::create(InterpreterInfo* interpret JSStringRelease(ioProcName); JSStringRef nameName = JSStringCreateWithUTF8CString("_name"); - JSStringRef name = JSStringCreateWithUTF8CString(dm->_interpreter->getName().c_str()); + JSStringRef name = JSStringCreateWithUTF8CString(dm->_callbacks->getName().c_str()); JSObjectSetProperty(dm->_ctx, JSContextGetGlobalObject(dm->_ctx), nameName, JSValueMakeString(dm->_ctx, name), kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL); JSStringRelease(nameName); JSStringRelease(name); JSStringRef sessionIdName = JSStringCreateWithUTF8CString("_sessionid"); - JSStringRef sessionId = JSStringCreateWithUTF8CString(dm->_interpreter->getSessionId().c_str()); + JSStringRef sessionId = JSStringCreateWithUTF8CString(dm->_callbacks->getSessionId().c_str()); JSObjectSetProperty(dm->_ctx, JSContextGetGlobalObject(dm->_ctx), sessionIdName, JSValueMakeString(dm->_ctx, sessionId), kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL); JSStringRelease(sessionIdName); JSStringRelease(sessionId); - JSC_ADD_GLOBAL_OBJECT(ArrayBuffer, JSCArrayBuffer::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Int8Array, JSCInt8Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint8Array, JSCUint8Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint8ClampedArray, JSCUint8ClampedArray::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Int16Array, JSCInt16Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint16Array, JSCUint16Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Int32Array, JSCInt32Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint32Array, JSCUint32Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Float32Array, JSCFloat32Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Float64Array, JSCFloat64Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(DataView, JSCDataView::getTmpl()); - - JSCDocument::JSCDocumentPrivate* privData = new JSCDocument::JSCDocumentPrivate(); - if (interpreter) { - privData->nativeObj = new Document<std::string>(interpreter->getDocument()); - privData->dom = dm->_dom; - - JSObjectRef documentObject = JSObjectMake(dm->_ctx, JSCDocument::getTmpl(), privData); - JSObjectRef globalObject = JSContextGetGlobalObject(dm->_ctx); - JSStringRef documentName = JSStringCreateWithUTF8CString("document"); - - JSObjectSetProperty(dm->_ctx, globalObject, documentName, documentObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL); - JSStringRelease(documentName); - } - - dm->eval(Element<std::string>(), "_x = {};"); + dm->evalAsValue("_x = {};"); return dm; } -void JSCDataModel::pushContext() { -} - -void JSCDataModel::popContext() { -} - void JSCDataModel::setEvent(const Event& event) { - JSCSCXMLEvent::JSCSCXMLEventPrivate* privData = new JSCSCXMLEvent::JSCSCXMLEventPrivate(); - privData->nativeObj = new Event(event); - privData->dom = _dom; + Event* evPtr = new Event(event); - JSObjectRef eventObj = JSObjectMake(_ctx, JSCSCXMLEvent::getTmpl(), privData); + JSObjectRef eventObj = SWIG_JSC_NewPointerObj(_ctx, evPtr, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); JSObjectRef globalObject = JSContextGetGlobalObject(_ctx); JSValueRef exception = NULL; - if (event.raw.size() == 0) { - std::stringstream ssRaw; - ssRaw << event; - privData->nativeObj->raw = ssRaw.str(); + /* Manually handle swig ignored fields */ + EVENT_STRING_OR_UNDEF(sendid, !event.hideSendId); // test333 + EVENT_STRING_OR_UNDEF(origin, event.origin.size() > 0); // test335 + EVENT_STRING_OR_UNDEF(origintype, event.origintype.size() > 0); // test337 + EVENT_STRING_OR_UNDEF(invokeid, event.invokeid.size() > 0); // test339 + + /* Manually handle swig ignored event type */ + JSStringRef eventTypeName = JSStringCreateWithUTF8CString("type"); + JSStringRef eventTypeVal; + + // test 331 + switch (event.eventType) { + case Event::EXTERNAL: + eventTypeVal = JSStringCreateWithUTF8CString("external"); + break; + case Event::INTERNAL: + eventTypeVal = JSStringCreateWithUTF8CString("internal"); + break; + case Event::PLATFORM: + eventTypeVal = JSStringCreateWithUTF8CString("platform"); + break; } - if (event.dom) { + JSObjectSetProperty(_ctx, eventObj, eventTypeName, JSValueMakeString(_ctx, eventTypeVal), 0, &exception); + if (exception) + handleException(exception); + + JSStringRelease(eventTypeName); + JSStringRelease(eventTypeVal); + + /* Manually handle swig ignored event data */ + if (event.data.node) { JSStringRef propName = JSStringCreateWithUTF8CString("data"); - JSObjectSetProperty(_ctx, eventObj, propName, getNodeAsValue(event.dom), 0, &exception); + JSObjectSetProperty(_ctx, eventObj, propName, getNodeAsValue(event.data.node), 0, &exception); JSStringRelease(propName); if (exception) handleException(exception); - +#if 0 } else if (event.content.length() > 0) { // _event.data is a string or JSON Data json = Data::fromJSON(event.content); @@ -319,6 +351,7 @@ void JSCDataModel::setEvent(const Event& event) { if (exception) handleException(exception); } +#endif } else { // _event.data is KVP Event eventCopy(event); @@ -359,22 +392,21 @@ void JSCDataModel::setEvent(const Event& event) { } -Data JSCDataModel::getStringAsData(const std::string& content) { +Data JSCDataModel::evalAsData(const std::string& content) { JSValueRef result = evalAsValue(content); - Data data = getValueAsData(result); - return data; + return getValueAsData(result); +} + +Data JSCDataModel::getAsData(const std::string& content) { + // parse as JSON test 578 + return Data::fromJSON(content); } JSValueRef JSCDataModel::getDataAsValue(const Data& data) { JSValueRef exception = NULL; if (data.node) { - JSCNode::JSCNodePrivate* privData = new JSCNode::JSCNodePrivate(); - privData->nativeObj = new Node<std::string>(data.node); - privData->dom = _dom; - - JSObjectRef value = JSObjectMake(_ctx, JSCNode::getTmpl(), privData); - return value; + return getNodeAsValue(data.node); } if (data.compound.size() > 0) { JSObjectRef value = JSObjectMake(_ctx, 0, 0); @@ -417,16 +449,16 @@ JSValueRef JSCDataModel::getDataAsValue(const Data& data) { } } } - if (data.binary) { - uscxml::ArrayBuffer* localInstance = new uscxml::ArrayBuffer(data.binary); - - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(_ctx, retClass, retPrivData); - return retObj; - } +// if (data.binary) { +// uscxml::ArrayBuffer* localInstance = new uscxml::ArrayBuffer(data.binary); +// +// JSClassRef retClass = JSCArrayBuffer::getTmpl(); +// struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); +// retPrivData->nativeObj = localInstance; +// +// JSObjectRef retObj = JSObjectMake(_ctx, retClass, retPrivData); +// return retObj; +// } return JSValueMakeUndefined(_ctx); } @@ -466,15 +498,18 @@ Data JSCDataModel::getValueAsData(const JSValueRef value) { JSObjectRef objValue = JSValueToObject(_ctx, value, &exception); if (exception) handleException(exception); - if (JSValueIsObjectOfClass(_ctx, value, JSCArrayBuffer::getTmpl())) { - // binary data - JSCArrayBuffer::JSCArrayBufferPrivate* privObj = (JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(objValue); - data.binary = privObj->nativeObj->_blob; - return data; - } else if (JSValueIsObjectOfClass(_ctx, value, JSCNode::getTmpl())) { +// if (JSValueIsObjectOfClass(_ctx, value, JSCArrayBuffer::getTmpl())) { +// // binary data +// JSCArrayBuffer::JSCArrayBufferPrivate* privObj = (JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(objValue); +// data.binary = privObj->nativeObj->_blob; +// return data; +// } else + + if (JSValueIsObjectOfClass(_ctx, value, _exports_DOMNode_classRef)) { // dom node - JSCNode::JSCNodePrivate* privObj = (JSCNode::JSCNodePrivate*)JSObjectGetPrivate(objValue); - data.node = *privObj->nativeObj; + void* privData = NULL; + SWIG_JSC_ConvertPtr(_ctx, value, &privData, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0); + data.node = (xercesc::DOMNode*)privData; return data; } std::set<std::string> propertySet; @@ -518,10 +553,6 @@ Data JSCDataModel::getValueAsData(const JSValueRef value) { return data; } -bool JSCDataModel::validate(const std::string& location, const std::string& schema) { - return true; -} - uint32_t JSCDataModel::getLength(const std::string& expr) { JSValueRef result; @@ -558,10 +589,12 @@ void JSCDataModel::setForeach(const std::string& item, } } +#if 0 bool JSCDataModel::isLocation(const std::string& expr) { // location needs to be LHS and ++ is only valid for LHS return isValidSyntax(expr + "++"); } +#endif bool JSCDataModel::isValidSyntax(const std::string& expr) { JSStringRef scriptJS = JSStringCreateWithUTF8CString(expr.c_str()); @@ -587,34 +620,11 @@ bool JSCDataModel::isDeclared(const std::string& expr) { return true; } -void JSCDataModel::eval(const Element<std::string>& scriptElem, - const std::string& expr) { - evalAsValue(expr); -} - -bool JSCDataModel::evalAsBool(const Arabica::DOM::Element<std::string>& node, const std::string& expr) { +bool JSCDataModel::evalAsBool(const std::string& expr) { JSValueRef result = evalAsValue(expr); return JSValueToBoolean(_ctx, result); } -std::string JSCDataModel::evalAsString(const std::string& expr) { - JSValueRef result = evalAsValue(expr); - JSValueRef exception = NULL; - - JSStringRef stringValue = JSValueToStringCopy( _ctx, result, &exception); - if (exception) - handleException(exception); - - size_t maxSize = JSStringGetMaximumUTF8CStringSize(stringValue); - char data[maxSize]; - JSStringGetUTF8CString(stringValue, data, maxSize); - std::string retString(data); - - JSStringRelease(stringValue); - - return retString; -} - JSValueRef JSCDataModel::evalAsValue(const std::string& expr, bool dontThrow) { JSStringRef scriptJS = JSStringCreateWithUTF8CString(expr.c_str()); JSValueRef exception = NULL; @@ -627,24 +637,27 @@ JSValueRef JSCDataModel::evalAsValue(const std::string& expr, bool dontThrow) { return result; } -JSValueRef JSCDataModel::getNodeAsValue(const Node<std::string>& node) { - switch (node.getNodeType()) { - case Node_base::ELEMENT_NODE: { - TO_JSC_DOMVALUE(Element); - } - case Node_base::TEXT_NODE: { - TO_JSC_DOMVALUE(Text); - } - case Node_base::CDATA_SECTION_NODE: { - TO_JSC_DOMVALUE(CDATASection); - } - case Node_base::DOCUMENT_NODE: { - TO_JSC_DOMVALUE(Document); - } - default: { - TO_JSC_DOMVALUE(Node); - } - } +JSValueRef JSCDataModel::getNodeAsValue(const DOMNode* node) { + return SWIG_JSC_NewPointerObj(_ctx, + (void*)node, + SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, + SWIG_as_voidptrptr(&node)), + 0); + +// switch (node->getNodeType()) { +// case DOMNode::ELEMENT_NODE: +// return SWIG_JSC_NewPointerObj(_ctx, (void*)node, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0); +// break; +// +// case DOMNode::COMMENT_NODE: +// return SWIG_JSC_NewPointerObj(_ctx, (void*)node, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment, 0); +// break; +// +// // TODO: We need to dispatch more types here! +// default: +// return SWIG_JSC_NewPointerObj(_ctx, (void*)node, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0); +// break; +// } } void JSCDataModel::assign(const std::string& location, const Data& data) { @@ -669,7 +682,7 @@ void JSCDataModel::assign(const std::string& location, const Data& data) { } /** - * test157: We need to evluate, as this will not throw for 'continue' = Var[5] in + * test157: We need to evaluate, as this will not throw for 'continue' = Var[5] in */ // JSObjectSetProperty(_ctx, JSContextGetGlobalObject(_ctx), JSStringCreateWithUTF8CString(location.c_str()), getDataAsValue(data), 0, &exception); @@ -677,66 +690,10 @@ void JSCDataModel::assign(const std::string& location, const Data& data) { handleException(exception); } -void JSCDataModel::assign(const Element<std::string>& assignElem, - const Node<std::string>& node, - const std::string& content) { - std::string key; - if (HAS_ATTR(assignElem, "id")) { - key = ATTR(assignElem, "id"); - } else if (HAS_ATTR(assignElem, "location")) { - key = ATTR(assignElem, "location"); - } - if (key.length() == 0) { - ERROR_EXECUTION_THROW("Assign element has neither id nor location"); - } - - if (HAS_ATTR(assignElem, "expr")) { - assign(key, Data(ATTR(assignElem, "expr"), Data::INTERPRETED)); - } else if (node) { - Data d; - d.node = node; - assign(key, d); - } else if (content.size() > 0) { - try { - Data d = Data::fromJSON(content); - if (d.empty()) - throw Event(); - assign(key, Data(d, Data::INTERPRETED)); - } catch (Event e) { - assign(key, Data("\"" + spaceNormalize(content) + "\"", Data::INTERPRETED)); - } - } else { - JSValueRef exception = NULL; - JSObjectSetProperty(_ctx, JSContextGetGlobalObject(_ctx), JSStringCreateWithUTF8CString(key.c_str()), JSValueMakeUndefined(_ctx), 0, &exception); - if (exception) - handleException(exception); - } -} - -void JSCDataModel::init(const Element<std::string>& dataElem, - const Node<std::string>& node, - const std::string& content) { - try { - assign(dataElem, node, content); - } catch (Event e) { - // test 277 - std::string key; - if (HAS_ATTR(dataElem, "id")) { - key = ATTR(dataElem, "id"); - } else if (HAS_ATTR(dataElem, "location")) { - key = ATTR(dataElem, "location"); - } - if (key.size() > 0) { - evalAsValue(key + " = undefined", true); - } - throw e; - } -} - void JSCDataModel::init(const std::string& location, const Data& data) { try { assign(location, data); - } catch (Event e) { + } catch (ErrorEvent e) { // test 277 evalAsValue(location + " = undefined", true); throw e; @@ -814,7 +771,7 @@ JSValueRef JSCDataModel::jsIn(JSContextRef ctx, JSObjectRef function, JSObjectRe std::string stateName(buffer); free(buffer); - if (INSTANCE->_interpreter->isInState(stateName)) { + if (INSTANCE->_callbacks->isInState(stateName)) { continue; } } @@ -826,7 +783,7 @@ JSValueRef JSCDataModel::jsIn(JSContextRef ctx, JSObjectRef function, JSObjectRe bool JSCDataModel::jsIOProcessorHasProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map<std::string, IOProcessor> ioProcessors = INSTANCE->_interpreter->getIOProcessors(); + std::map<std::string, IOProcessor> ioProcessors = INSTANCE->_callbacks->getIOProcessors(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -838,7 +795,7 @@ bool JSCDataModel::jsIOProcessorHasProp(JSContextRef ctx, JSObjectRef object, JS JSValueRef JSCDataModel::jsIOProcessorGetProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map<std::string, IOProcessor> ioProcessors = INSTANCE->_interpreter->getIOProcessors(); + std::map<std::string, IOProcessor> ioProcessors = INSTANCE->_callbacks->getIOProcessors(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -853,7 +810,7 @@ JSValueRef JSCDataModel::jsIOProcessorGetProp(JSContextRef ctx, JSObjectRef obje void JSCDataModel::jsIOProcessorListProps(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map<std::string, IOProcessor> ioProcessors = INSTANCE->_interpreter->getIOProcessors(); + std::map<std::string, IOProcessor> ioProcessors = INSTANCE->_callbacks->getIOProcessors(); std::map<std::string, IOProcessor>::const_iterator ioProcIter = ioProcessors.begin(); while(ioProcIter != ioProcessors.end()) { @@ -866,7 +823,7 @@ void JSCDataModel::jsIOProcessorListProps(JSContextRef ctx, JSObjectRef object, bool JSCDataModel::jsInvokerHasProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map<std::string, Invoker> invokers = INSTANCE->_interpreter->getInvokers(); + std::map<std::string, Invoker> invokers = INSTANCE->_callbacks->getInvokers(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -878,7 +835,7 @@ bool JSCDataModel::jsInvokerHasProp(JSContextRef ctx, JSObjectRef object, JSStri JSValueRef JSCDataModel::jsInvokerGetProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map<std::string, Invoker> invokers = INSTANCE->_interpreter->getInvokers(); + std::map<std::string, Invoker> invokers = INSTANCE->_callbacks->getInvokers(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -893,7 +850,7 @@ JSValueRef JSCDataModel::jsInvokerGetProp(JSContextRef ctx, JSObjectRef object, void JSCDataModel::jsInvokerListProps(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map<std::string, Invoker> invokers = INSTANCE->_interpreter->getInvokers(); + std::map<std::string, Invoker> invokers = INSTANCE->_callbacks->getInvokers(); std::map<std::string, Invoker>::const_iterator invokerIter = invokers.begin(); while(invokerIter != invokers.end()) { diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h index ccadc79..55e5c1f 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h @@ -20,11 +20,10 @@ #ifndef JSCDATAMODEL_H_KN8TWG0V #define JSCDATAMODEL_H_KN8TWG0V -#include "uscxml/InterpreterInfo.h" #include "uscxml/plugins/DataModel.h" #include <list> +#include <set> #include <JavaScriptCore/JavaScriptCore.h> -#include "JSCDOM.h" #ifdef BUILD_AS_PLUGINS #include "uscxml/plugins/Plugins.h" @@ -41,7 +40,7 @@ class JSCDataModel : public DataModelImpl { public: JSCDataModel(); virtual ~JSCDataModel(); - virtual boost::shared_ptr<DataModelImpl> create(InterpreterInfo* interpreter); + virtual std::shared_ptr<DataModelImpl> create(DataModelCallbacks* callbacks); virtual void addExtension(DataModelExtension* ext); @@ -51,12 +50,9 @@ public: return names; } - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); virtual bool isValidSyntax(const std::string& expr); virtual void setEvent(const Event& event); - virtual Data getStringAsData(const std::string& content); // foreach virtual uint32_t getLength(const std::string& expr); @@ -64,31 +60,19 @@ public: const std::string& array, const std::string& index, uint32_t iteration); - virtual void pushContext(); - virtual void popContext(); - virtual void eval(const Arabica::DOM::Element<std::string>& scriptElem, - const std::string& expr); - virtual std::string evalAsString(const std::string& expr); - - virtual bool evalAsBool(const Arabica::DOM::Element<std::string>& node, const std::string& expr); + virtual Data getAsData(const std::string& content); + virtual Data evalAsData(const std::string& expr); + virtual bool evalAsBool(const std::string& expr); virtual bool isDeclared(const std::string& expr); - virtual void assign(const Arabica::DOM::Element<std::string>& assignElem, - const Arabica::DOM::Node<std::string>& node, - const std::string& content); virtual void assign(const std::string& location, const Data& data); - - virtual void init(const Arabica::DOM::Element<std::string>& dataElem, - const Arabica::DOM::Node<std::string>& node, - const std::string& content); virtual void init(const std::string& location, const Data& data); virtual std::string andExpressions(std::list<std::string>); protected: - Arabica::DOM::JSCDOM* _dom; static JSClassDefinition jsInClassDef; static JSValueRef jsIn(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); @@ -107,7 +91,7 @@ protected: static JSValueRef jsInvokerGetProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); static void jsInvokerListProps(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); - JSValueRef getNodeAsValue(const Arabica::DOM::Node<std::string>& node); + JSValueRef getNodeAsValue(const xercesc::DOMNode* node); JSValueRef getDataAsValue(const Data& data); Data getValueAsData(const JSValueRef value); JSValueRef evalAsValue(const std::string& expr, bool dontThrow = false); @@ -122,6 +106,8 @@ protected: Event _event; JSGlobalContextRef _ctx; + static std::mutex _initMutex; + }; #ifdef BUILD_AS_PLUGINS diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/bindings.i b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/bindings.i new file mode 100644 index 0000000..bf8a0fa --- /dev/null +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/bindings.i @@ -0,0 +1,46 @@ +#define XERCES_HAS_CPP_NAMESPACE 1 + +%include <std_string.i> + +/* + +swig -I/Users/sradomski/Documents/TK/Code/uscxml2/build/cli/deps/xerces-c/include/ -javascript -jsc -c++ uscxml.i +gcc -I/Users/sradomski/Documents/TK/Code/uscxml2/build/cli/deps/xerces-c/include/ ./uscxml_wrap.cxx + +*/ + +%module JSCDOM + +%import "uscxml/config.h" +%import "uscxml/Common.h" + +%import "xercesc/util/XercesDefs.hpp" +%import "xercesc/util/Xerces_autoconf_config.hpp" + +%include "../../common/bindings/dom/ignore.i" +%include "../../common/bindings/dom/defines.i" +%include "../../common/bindings/dom/typemaps-general.i" + +// in typemap +%typemap(in) XMLCh * %{ + $1 = JS2XMLString($input, context); +%} + +%typemap(freearg) XMLCh * %{ + delete[] $1; +%} + +// out typemap +%typemap(out) XMLCh * %{ + $result = XMLString2JS($1, context); +%} + + +%include "../../common/bindings/dom/dom.i" + +// Operators we do want +// %rename(operator_assignment) operator=; +%rename(operator_equal_to) operator==; +%rename(operator_not_equal_to) operator!=; + +%include "../../common/bindings/event.i" diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.cpp deleted file mode 100644 index b6a262d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCArrayBuffer::Tmpl; - -JSStaticValue JSCArrayBuffer::staticValues[] = { - { "byteLength", byteLengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "mimeType", mimeTypeAttrGetter, mimeTypeAttrSetter, kJSPropertyAttributeDontDelete }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCArrayBuffer::staticFunctions[] = { - { "md5", md5Callback, kJSPropertyAttributeDontDelete }, - { "base64", base64Callback, kJSPropertyAttributeDontDelete }, - { "slice", sliceCallback, kJSPropertyAttributeDontDelete }, - { "isView", isViewCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCArrayBuffer::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::ArrayBuffer* localInstance = NULL; - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::ArrayBuffer(localLength); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for ArrayBuffer"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCArrayBuffer::byteLengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getByteLength()); -} - - -JSValueRef JSCArrayBuffer::mimeTypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getMimeType().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCArrayBuffer::mimeTypeAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalMimeType = JSValueToStringCopy(ctx, value, exception); - size_t localMimeTypeMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalMimeType); - char* localMimeTypeBuffer = new char[localMimeTypeMaxSize]; - JSStringGetUTF8CString(stringReflocalMimeType, localMimeTypeBuffer, localMimeTypeMaxSize); - std::string localMimeType(localMimeTypeBuffer); - JSStringRelease(stringReflocalMimeType); - free(localMimeTypeBuffer); - - privData->nativeObj->setMimeType(localMimeType); - return true; -} - -JSValueRef JSCArrayBuffer::md5Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - std::string retVal = privData->nativeObj->md5(); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling md5"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCArrayBuffer::base64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - std::string retVal = privData->nativeObj->base64(); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling base64"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCArrayBuffer::sliceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localBegin = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::ArrayBuffer* retVal = new uscxml::ArrayBuffer(privData->nativeObj->slice(localBegin, localEnd)); - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localBegin = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::ArrayBuffer* retVal = new uscxml::ArrayBuffer(privData->nativeObj->slice(localBegin)); - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling slice"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCArrayBuffer::isViewCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - true) { - void* localValue = JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)); - - bool retVal = privData->nativeObj->isView(localValue); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling isView"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h deleted file mode 100644 index cd2147f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCArrayBuffer_h -#define JSCArrayBuffer_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCArrayBuffer { -public: - struct JSCArrayBufferPrivate { - JSCDOM* dom; - uscxml::ArrayBuffer* nativeObj; - }; - - JSC_DESTRUCTOR(JSCArrayBufferPrivate); - - static JSValueRef md5Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef base64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef sliceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef isViewCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef byteLengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef mimeTypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool mimeTypeAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "ArrayBuffer"; - classDef.callAsConstructor = jsConstructor; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCArrayBuffer_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.cpp deleted file mode 100644 index ad567e8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCArrayBufferView::Tmpl; - -JSStaticValue JSCArrayBufferView::staticValues[] = { - { "buffer", bufferAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "byteOffset", byteOffsetAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "byteLength", byteLengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCArrayBufferView::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCArrayBufferView::bufferAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferViewPrivate* privData = (struct JSCArrayBufferViewPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getBuffer()) return JSValueMakeUndefined(ctx); - uscxml::ArrayBuffer* arabicaRet = new uscxml::ArrayBuffer(privData->nativeObj->getBuffer()); - - JSClassRef arbaicaRetClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCArrayBufferView::byteOffsetAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferViewPrivate* privData = (struct JSCArrayBufferViewPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getByteOffset()); -} - - -JSValueRef JSCArrayBufferView::byteLengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferViewPrivate* privData = (struct JSCArrayBufferViewPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getByteLength()); -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.h deleted file mode 100644 index a6910a1..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCArrayBufferView_h -#define JSCArrayBufferView_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCArrayBufferView { -public: - struct JSCArrayBufferViewPrivate { - JSCDOM* dom; - uscxml::ArrayBufferView* nativeObj; - }; - - JSC_DESTRUCTOR(JSCArrayBufferViewPrivate); - - - static JSValueRef bufferAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef byteOffsetAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef byteLengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "ArrayBufferView"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCArrayBufferView_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp deleted file mode 100644 index 31349cb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCAttr.h" -#include "JSCElement.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCAttr::Tmpl; - -JSStaticValue JSCAttr::staticValues[] = { - { "name", nameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "specified", specifiedAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "value", valueAttrGetter, valueAttrSetter, kJSPropertyAttributeDontDelete }, - { "ownerElement", ownerElementAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCAttr::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCAttr::nameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCAttr::specifiedAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeBoolean(ctx, privData->nativeObj->getSpecified()); -} - - -JSValueRef JSCAttr::valueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getValue().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCAttr::valueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, value, exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - privData->nativeObj->setValue(localValue); - return true; -} - -JSValueRef JSCAttr::ownerElementAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getOwnerElement()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Element<std::string>* arabicaRet = new Arabica::DOM::Element<std::string>(privData->nativeObj->getOwnerElement()); - - JSClassRef arbaicaRetClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.h deleted file mode 100644 index adcb6bc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCAttr_h -#define JSCAttr_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCAttr { -public: - struct JSCAttrPrivate { - JSCDOM* dom; - Arabica::DOM::Attr<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCAttrPrivate); - - - static JSValueRef nameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef specifiedAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef valueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool valueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef ownerElementAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Attr"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCAttr_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.cpp deleted file mode 100644 index 3969a92..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCCDATASection.h" -#include "JSCText.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCCDATASection::Tmpl; - -JSStaticValue JSCCDATASection::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCCDATASection::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.h deleted file mode 100644 index 32ef4bc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCCDATASection_h -#define JSCCDATASection_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCText.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCCDATASection { -public: - struct JSCCDATASectionPrivate { - JSCDOM* dom; - Arabica::DOM::CDATASection<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCCDATASectionPrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "CDATASection"; - classDef.parentClass = JSCText::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCCDATASection_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.cpp deleted file mode 100644 index cfb1720..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCCharacterData.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCCharacterData::Tmpl; - -JSStaticValue JSCCharacterData::staticValues[] = { - { "data", dataAttrGetter, dataAttrSetter, kJSPropertyAttributeDontDelete }, - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCCharacterData::staticFunctions[] = { - { "substringData", substringDataCallback, kJSPropertyAttributeDontDelete }, - { "appendData", appendDataCallback, kJSPropertyAttributeDontDelete }, - { "insertData", insertDataCallback, kJSPropertyAttributeDontDelete }, - { "deleteData", deleteDataCallback, kJSPropertyAttributeDontDelete }, - { "replaceData", replaceDataCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCCharacterData::dataAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getData().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCCharacterData::dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, value, exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - privData->nativeObj->setData(localData); - return true; -} - -JSValueRef JSCCharacterData::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCCharacterData::substringDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localCount = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - std::string retVal = privData->nativeObj->substringData(localOffset, localCount); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling substringData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::appendDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalArg = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localArgMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalArg); - char* localArgBuffer = new char[localArgMaxSize]; - JSStringGetUTF8CString(stringReflocalArg, localArgBuffer, localArgMaxSize); - std::string localArg(localArgBuffer); - JSStringRelease(stringReflocalArg); - free(localArgBuffer); - - - privData->nativeObj->appendData(localArg); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling appendData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::insertDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - JSStringRef stringReflocalArg = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localArgMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalArg); - char* localArgBuffer = new char[localArgMaxSize]; - JSStringGetUTF8CString(stringReflocalArg, localArgBuffer, localArgMaxSize); - std::string localArg(localArgBuffer); - JSStringRelease(stringReflocalArg); - free(localArgBuffer); - - - privData->nativeObj->insertData(localOffset, localArg); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling insertData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::deleteDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localCount = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->deleteData(localOffset, localCount); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling deleteData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::replaceDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsString(ctx, arguments[2])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localCount = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - JSStringRef stringReflocalArg = JSValueToStringCopy(ctx, arguments[2], exception); - size_t localArgMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalArg); - char* localArgBuffer = new char[localArgMaxSize]; - JSStringGetUTF8CString(stringReflocalArg, localArgBuffer, localArgMaxSize); - std::string localArg(localArgBuffer); - JSStringRelease(stringReflocalArg); - free(localArgBuffer); - - - privData->nativeObj->replaceData(localOffset, localCount, localArg); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling replaceData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.h deleted file mode 100644 index b351fa2..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCCharacterData_h -#define JSCCharacterData_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCCharacterData { -public: - struct JSCCharacterDataPrivate { - JSCDOM* dom; - Arabica::DOM::CharacterData<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCCharacterDataPrivate); - - static JSValueRef substringDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef appendDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef insertDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef deleteDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef replaceDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef dataAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "CharacterData"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCCharacterData_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.cpp deleted file mode 100644 index c8ae170..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCCharacterData.h" -#include "JSCComment.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCComment::Tmpl; - -JSStaticValue JSCComment::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCComment::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.h deleted file mode 100644 index 38a7822..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCComment_h -#define JSCComment_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCCharacterData.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCComment { -public: - struct JSCCommentPrivate { - JSCDOM* dom; - Arabica::DOM::Comment<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCCommentPrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Comment"; - classDef.parentClass = JSCCharacterData::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCComment_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.cpp deleted file mode 100644 index 7bdca82..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCDOMImplementation.h" -#include "JSCDocument.h" -#include "JSCDocumentType.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDOMImplementation::Tmpl; - -JSStaticValue JSCDOMImplementation::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDOMImplementation::staticFunctions[] = { - { "hasFeature", hasFeatureCallback, kJSPropertyAttributeDontDelete }, - { "createDocumentType", createDocumentTypeCallback, kJSPropertyAttributeDontDelete }, - { "createDocument", createDocumentCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCDOMImplementation::hasFeatureCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDOMImplementationPrivate* privData = (struct JSCDOMImplementationPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalFeature = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localFeatureMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalFeature); - char* localFeatureBuffer = new char[localFeatureMaxSize]; - JSStringGetUTF8CString(stringReflocalFeature, localFeatureBuffer, localFeatureMaxSize); - std::string localFeature(localFeatureBuffer); - JSStringRelease(stringReflocalFeature); - free(localFeatureBuffer); - - JSStringRef stringReflocalVersion = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localVersionMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalVersion); - char* localVersionBuffer = new char[localVersionMaxSize]; - JSStringGetUTF8CString(stringReflocalVersion, localVersionBuffer, localVersionMaxSize); - std::string localVersion(localVersionBuffer); - JSStringRelease(stringReflocalVersion); - free(localVersionBuffer); - - - bool retVal = privData->nativeObj->hasFeature(localFeature, localVersion); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasFeature"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDOMImplementation::createDocumentTypeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDOMImplementationPrivate* privData = (struct JSCDOMImplementationPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1]) && - JSValueIsString(ctx, arguments[2])) { - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - JSStringRef stringReflocalPublicId = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localPublicIdMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalPublicId); - char* localPublicIdBuffer = new char[localPublicIdMaxSize]; - JSStringGetUTF8CString(stringReflocalPublicId, localPublicIdBuffer, localPublicIdMaxSize); - std::string localPublicId(localPublicIdBuffer); - JSStringRelease(stringReflocalPublicId); - free(localPublicIdBuffer); - - JSStringRef stringReflocalSystemId = JSValueToStringCopy(ctx, arguments[2], exception); - size_t localSystemIdMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalSystemId); - char* localSystemIdBuffer = new char[localSystemIdMaxSize]; - JSStringGetUTF8CString(stringReflocalSystemId, localSystemIdBuffer, localSystemIdMaxSize); - std::string localSystemId(localSystemIdBuffer); - JSStringRelease(stringReflocalSystemId); - free(localSystemIdBuffer); - - - Arabica::DOM::DocumentType<std::string>* retVal = new Arabica::DOM::DocumentType<std::string>(privData->nativeObj->createDocumentType(localQualifiedName, localPublicId, localSystemId)); - JSClassRef retClass = JSCDocumentType::getTmpl(); - - struct JSCDocumentType::JSCDocumentTypePrivate* retPrivData = new JSCDocumentType::JSCDocumentTypePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createDocumentType"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDOMImplementation::createDocumentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDOMImplementationPrivate* privData = (struct JSCDOMImplementationPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1]) && - JSValueIsObject(ctx, arguments[2]) && JSValueIsObjectOfClass(ctx, arguments[2], JSCDocumentType::getTmpl())) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - Arabica::DOM::DocumentType<std::string>* localDoctype = ((struct JSCDocumentType::JSCDocumentTypePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[2], exception)))->nativeObj; - - Arabica::DOM::Document<std::string>* retVal = new Arabica::DOM::Document<std::string>(privData->nativeObj->createDocument(localNamespaceURI, localQualifiedName, *localDoctype)); - JSClassRef retClass = JSCDocument::getTmpl(); - - struct JSCDocument::JSCDocumentPrivate* retPrivData = new JSCDocument::JSCDocumentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createDocument"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.h deleted file mode 100644 index 4c39d93..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCDOMImplementation_h -#define JSCDOMImplementation_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDOMImplementation { -public: - struct JSCDOMImplementationPrivate { - JSCDOM* dom; - Arabica::DOM::DOMImplementation<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDOMImplementationPrivate); - - static JSValueRef hasFeatureCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createDocumentTypeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createDocumentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DOMImplementation"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDOMImplementation_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.cpp deleted file mode 100644 index 958a2fe..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.cpp +++ /dev/null @@ -1,583 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCDataView.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDataView::Tmpl; - -JSStaticValue JSCDataView::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDataView::staticFunctions[] = { - { "getInt8", getInt8Callback, kJSPropertyAttributeDontDelete }, - { "getUint8", getUint8Callback, kJSPropertyAttributeDontDelete }, - { "getInt16", getInt16Callback, kJSPropertyAttributeDontDelete }, - { "getUint16", getUint16Callback, kJSPropertyAttributeDontDelete }, - { "getInt32", getInt32Callback, kJSPropertyAttributeDontDelete }, - { "getUint32", getUint32Callback, kJSPropertyAttributeDontDelete }, - { "getFloat32", getFloat32Callback, kJSPropertyAttributeDontDelete }, - { "getFloat64", getFloat64Callback, kJSPropertyAttributeDontDelete }, - { "setInt8", setInt8Callback, kJSPropertyAttributeDontDelete }, - { "setUint8", setUint8Callback, kJSPropertyAttributeDontDelete }, - { "setInt16", setInt16Callback, kJSPropertyAttributeDontDelete }, - { "setUint16", setUint16Callback, kJSPropertyAttributeDontDelete }, - { "setInt32", setInt32Callback, kJSPropertyAttributeDontDelete }, - { "setUint32", setUint32Callback, kJSPropertyAttributeDontDelete }, - { "setFloat32", setFloat32Callback, kJSPropertyAttributeDontDelete }, - { "setFloat64", setFloat64Callback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCDataView::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::DataView* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localByteLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::DataView(localBuffer, localByteOffset, localByteLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::DataView(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::DataView(localBuffer); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for DataView"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCDataView::getTmpl(); - - struct JSCDataView::JSCDataViewPrivate* retPrivData = new JSCDataView::JSCDataViewPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCDataView::getInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - char retVal = privData->nativeObj->getInt8(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getInt8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned char retVal = privData->nativeObj->getUint8(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getUint8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - short retVal = privData->nativeObj->getInt16(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - short retVal = privData->nativeObj->getInt16(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getInt16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - unsigned short retVal = privData->nativeObj->getUint16(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned short retVal = privData->nativeObj->getUint16(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getUint16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - long retVal = privData->nativeObj->getInt32(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - long retVal = privData->nativeObj->getInt32(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getInt32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - unsigned long retVal = privData->nativeObj->getUint32(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned long retVal = privData->nativeObj->getUint32(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getUint32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - float retVal = privData->nativeObj->getFloat32(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - float retVal = privData->nativeObj->getFloat32(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getFloat32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - double retVal = privData->nativeObj->getFloat64(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - double retVal = privData->nativeObj->getFloat64(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getFloat64"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - char localValue = (char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setInt8(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setInt8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned char localValue = (unsigned char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setUint8(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setUint8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - short localValue = (short)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setInt16(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - short localValue = (short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setInt16(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setInt16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned short localValue = (unsigned short)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setUint16(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned short localValue = (unsigned short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setUint16(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setUint16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - long localValue = (long)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setInt32(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - long localValue = (long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setInt32(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setInt32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localValue = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setUint32(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localValue = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setUint32(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setUint32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - float localValue = (float)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setFloat32(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - float localValue = (float)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setFloat32(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setFloat32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - double localValue = (double)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setFloat64(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - double localValue = (double)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setFloat64(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setFloat64"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.h deleted file mode 100644 index 6593068..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCDataView_h -#define JSCDataView_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDataView { -public: - struct JSCDataViewPrivate { - JSCDOM* dom; - uscxml::DataView* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDataViewPrivate); - - static JSValueRef getInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DataView"; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDataView_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp deleted file mode 100644 index 795ad70..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp +++ /dev/null @@ -1,542 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCAttr.h" -#include "JSCCDATASection.h" -#include "JSCComment.h" -#include "JSCDOMImplementation.h" -#include "JSCDocument.h" -#include "JSCDocumentFragment.h" -#include "JSCDocumentType.h" -#include "JSCElement.h" -#include "JSCEntityReference.h" -#include "JSCNode.h" -#include "JSCNodeList.h" -#include "JSCProcessingInstruction.h" -#include "JSCText.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDocument::Tmpl; - -JSStaticValue JSCDocument::staticValues[] = { - { "doctype", doctypeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "implementation", implementationAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "documentElement", documentElementAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "localStorage", localStorageCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDocument::staticFunctions[] = { - { "createElement", createElementCallback, kJSPropertyAttributeDontDelete }, - { "createDocumentFragment", createDocumentFragmentCallback, kJSPropertyAttributeDontDelete }, - { "createTextNode", createTextNodeCallback, kJSPropertyAttributeDontDelete }, - { "createComment", createCommentCallback, kJSPropertyAttributeDontDelete }, - { "createCDATASection", createCDATASectionCallback, kJSPropertyAttributeDontDelete }, - { "createProcessingInstruction", createProcessingInstructionCallback, kJSPropertyAttributeDontDelete }, - { "createAttribute", createAttributeCallback, kJSPropertyAttributeDontDelete }, - { "createEntityReference", createEntityReferenceCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagName", getElementsByTagNameCallback, kJSPropertyAttributeDontDelete }, - { "importNode", importNodeCallback, kJSPropertyAttributeDontDelete }, - { "createElementNS", createElementNSCustomCallback, kJSPropertyAttributeDontDelete }, - { "createAttributeNS", createAttributeNSCustomCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagNameNS", getElementsByTagNameNSCallback, kJSPropertyAttributeDontDelete }, - { "getElementById", getElementByIdCallback, kJSPropertyAttributeDontDelete }, - { "evaluate", evaluateCustomCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCDocument::doctypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getDoctype()) return JSValueMakeUndefined(ctx); - Arabica::DOM::DocumentType<std::string>* arabicaRet = new Arabica::DOM::DocumentType<std::string>(privData->nativeObj->getDoctype()); - - JSClassRef arbaicaRetClass = JSCDocumentType::getTmpl(); - - struct JSCDocumentType::JSCDocumentTypePrivate* retPrivData = new JSCDocumentType::JSCDocumentTypePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocument::implementationAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getImplementation()) return JSValueMakeUndefined(ctx); - Arabica::DOM::DOMImplementation<std::string>* arabicaRet = new Arabica::DOM::DOMImplementation<std::string>(privData->nativeObj->getImplementation()); - - JSClassRef arbaicaRetClass = JSCDOMImplementation::getTmpl(); - - struct JSCDOMImplementation::JSCDOMImplementationPrivate* retPrivData = new JSCDOMImplementation::JSCDOMImplementationPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocument::documentElementAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getDocumentElement()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Element<std::string>* arabicaRet = new Arabica::DOM::Element<std::string>(privData->nativeObj->getDocumentElement()); - - JSClassRef arbaicaRetClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocument::createElementCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalTagName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localTagNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalTagName); - char* localTagNameBuffer = new char[localTagNameMaxSize]; - JSStringGetUTF8CString(stringReflocalTagName, localTagNameBuffer, localTagNameMaxSize); - std::string localTagName(localTagNameBuffer); - JSStringRelease(stringReflocalTagName); - free(localTagNameBuffer); - - - Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElement(localTagName)); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createElement"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createDocumentFragmentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - Arabica::DOM::DocumentFragment<std::string>* retVal = new Arabica::DOM::DocumentFragment<std::string>(privData->nativeObj->createDocumentFragment()); - JSClassRef retClass = JSCDocumentFragment::getTmpl(); - - struct JSCDocumentFragment::JSCDocumentFragmentPrivate* retPrivData = new JSCDocumentFragment::JSCDocumentFragmentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createDocumentFragment"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createTextNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::Text<std::string>* retVal = new Arabica::DOM::Text<std::string>(privData->nativeObj->createTextNode(localData)); - JSClassRef retClass = JSCText::getTmpl(); - - struct JSCText::JSCTextPrivate* retPrivData = new JSCText::JSCTextPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createTextNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createCommentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::Comment<std::string>* retVal = new Arabica::DOM::Comment<std::string>(privData->nativeObj->createComment(localData)); - JSClassRef retClass = JSCComment::getTmpl(); - - struct JSCComment::JSCCommentPrivate* retPrivData = new JSCComment::JSCCommentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createComment"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createCDATASectionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::CDATASection<std::string>* retVal = new Arabica::DOM::CDATASection<std::string>(privData->nativeObj->createCDATASection(localData)); - JSClassRef retClass = JSCCDATASection::getTmpl(); - - struct JSCCDATASection::JSCCDATASectionPrivate* retPrivData = new JSCCDATASection::JSCCDATASectionPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createCDATASection"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createProcessingInstructionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalTarget = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localTargetMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalTarget); - char* localTargetBuffer = new char[localTargetMaxSize]; - JSStringGetUTF8CString(stringReflocalTarget, localTargetBuffer, localTargetMaxSize); - std::string localTarget(localTargetBuffer); - JSStringRelease(stringReflocalTarget); - free(localTargetBuffer); - - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::ProcessingInstruction<std::string>* retVal = new Arabica::DOM::ProcessingInstruction<std::string>(privData->nativeObj->createProcessingInstruction(localTarget, localData)); - JSClassRef retClass = JSCProcessingInstruction::getTmpl(); - - struct JSCProcessingInstruction::JSCProcessingInstructionPrivate* retPrivData = new JSCProcessingInstruction::JSCProcessingInstructionPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createProcessingInstruction"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttribute(localName)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createEntityReferenceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::EntityReference<std::string>* retVal = new Arabica::DOM::EntityReference<std::string>(privData->nativeObj->createEntityReference(localName)); - JSClassRef retClass = JSCEntityReference::getTmpl(); - - struct JSCEntityReference::JSCEntityReferencePrivate* retPrivData = new JSCEntityReference::JSCEntityReferencePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createEntityReference"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalTagname = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localTagnameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalTagname); - char* localTagnameBuffer = new char[localTagnameMaxSize]; - JSStringGetUTF8CString(stringReflocalTagname, localTagnameBuffer, localTagnameMaxSize); - std::string localTagname(localTagnameBuffer); - JSStringRelease(stringReflocalTagname); - free(localTagnameBuffer); - - - Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagName(localTagname)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagName"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::importNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl()) && - JSValueIsBoolean(ctx, arguments[1])) { - Arabica::DOM::Node<std::string>* localImportedNode = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - bool localDeep = JSValueToBoolean(ctx, arguments[1]); - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->importNode(*localImportedNode, localDeep)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling importNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagNameNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagNameNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::getElementByIdCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalElementId = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localElementIdMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalElementId); - char* localElementIdBuffer = new char[localElementIdMaxSize]; - JSStringGetUTF8CString(stringReflocalElementId, localElementIdBuffer, localElementIdMaxSize); - std::string localElementId(localElementIdBuffer); - JSStringRelease(stringReflocalElementId); - free(localElementIdBuffer); - - - Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->getElementById(localElementId)); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementById"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h deleted file mode 100644 index 1b300fb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCDocument_h -#define JSCDocument_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDocument { -public: - struct JSCDocumentPrivate { - JSCDOM* dom; - Arabica::DOM::Document<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDocumentPrivate); - - static JSValueRef createElementCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createDocumentFragmentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createTextNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createCommentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createCDATASectionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createProcessingInstructionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createEntityReferenceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef importNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createElementNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createAttributeNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementByIdCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef evaluateCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef doctypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef implementationAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef documentElementAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef localStorageCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Document"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDocument_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp deleted file mode 100644 index a6d194f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "JSCDocument.h" -#include "JSCElement.h" -#include "JSCAttr.h" -#include "JSCStorage.h" -#include "JSCXPathResult.h" -#include "JSCNode.h" -#include <XPath/XPath.hpp> -#include <DOM/io/Stream.hpp> - -namespace Arabica { -namespace DOM { - -JSValueRef JSCDocument::localStorageCustomAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->dom->storage) { - return JSValueMakeUndefined(ctx); - } - - JSClassRef retClass = JSCStorage::getTmpl(); - struct JSCStorage::JSCStoragePrivate* retPrivData = new JSCStorage::JSCStoragePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retPrivData->dom->storage; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, retClass, retPrivData); - return arbaicaRetObj; - -} - - -JSValueRef JSCDocument::evaluateCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef object, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->dom || !privData->dom->xpath) return JSValueMakeUndefined(ctx); - if (argumentCount < 1) { - std::string errorMsg = "Wrong number of arguments in evaluate"; - JSStringRef string = JSStringCreateWithUTF8CString(errorMsg.c_str()); - JSValueRef exceptionString = JSValueMakeString(ctx, string); - JSStringRelease(string); - *exception = JSValueToObject(ctx, exceptionString, NULL); - return JSValueMakeUndefined(ctx); - } - - // make sure first argument is a string - if (!JSValueIsString(ctx, arguments[0])) { - std::string errorMsg = "Expected xpath expression as first argument"; - JSStringRef string = JSStringCreateWithUTF8CString(errorMsg.c_str()); - JSValueRef exceptionString = JSValueMakeString(ctx, string); - JSStringRelease(string); - *exception = JSValueToObject(ctx, exceptionString, NULL); - return JSValueMakeUndefined(ctx); - } - - JSStringRef stringReflocalXPath = JSValueToStringCopy(ctx, arguments[0], NULL); - size_t localXPathMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalXPath); - char* localXPathBuffer = new char[localXPathMaxSize]; - JSStringGetUTF8CString(stringReflocalXPath, localXPathBuffer, localXPathMaxSize); - std::string localXPath(localXPathBuffer); - JSStringRelease(stringReflocalXPath); - free(localXPathBuffer); - - JSClassRef arbaicaRetClass = JSCXPathResult::getTmpl(); - - XPath::XPathValue<std::string>* retVal; - - try { - if (argumentCount > 1) { - // make sure second argument is a node - if (!JSValueIsObject(ctx, arguments[1])) { - std::string errorMsg = "Second argument is not of type node"; - JSStringRef string = JSStringCreateWithUTF8CString(errorMsg.c_str()); - JSValueRef exceptionString = JSValueMakeString(ctx, string); - JSStringRelease(string); - *exception = JSValueToObject(ctx, exceptionString, NULL); - return JSValueMakeUndefined(ctx); - } - -// Arabica::DOM::Node<std::string>* localContextNode = (Arabica::DOM::Node<std::string>*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], NULL)); - JSCNode::JSCNodePrivate* otherNodePrivate = (JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], NULL)); - Arabica::DOM::Node<std::string>* localContextNode = otherNodePrivate->nativeObj; - -// std::cout << *localContextNode << std::endl; -// std::cout << ">>" << privData->dom->xpath->evaluate("//note/@importance", *localContextNode).asString() << "<<" << std::endl; - - retVal = new XPath::XPathValue<std::string>(privData->dom->xpath->evaluate(localXPath, *localContextNode)); - } else { - retVal = new XPath::XPathValue<std::string>(privData->dom->xpath->evaluate(localXPath, *privData->nativeObj)); - } - } catch (std::runtime_error e) { - std::cout << e.what() << std::endl; - return JSValueMakeUndefined(ctx); - } - - struct JSCXPathResult::JSCXPathResultPrivate* retPrivData = new JSCXPathResult::JSCXPathResultPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; - -#if 0 - if (args.Length() < 1) - throw V8Exception("Wrong number of arguments in evaluate"); -// if (!((V8Node::hasInstance(args[1])) && (V8XPathResult::hasInstance(args[3])))) -// throw V8Exception("Parameter mismatch while calling evaluate"); - - v8::Local<v8::Object> self = args.Holder(); - V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0)); - - v8::String::AsciiValue localExpression(args[0]); - - XPath::XPathValue<std::string>* retVal; - if (args.Length() > 1) { - 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->nativeObj)); - } - - v8::Handle<v8::Function> retCtor = V8XPathResult::getTmpl()->GetFunction(); - v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance()); - - V8XPathResult::V8XPathResultPrivate* retPrivData = new V8XPathResult::V8XPathResultPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8XPathResult::jsDestructor); - return retObj; -#endif -} - -JSValueRef JSCDocument::createElementNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - - Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElementNS(localNamespaceURI, localQualifiedName)); - if (privData->dom->nsInfo->nsToPrefix.find(localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) - retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[localNamespaceURI]); - - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createElementNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createAttributeNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttributeNS(localNamespaceURI, localQualifiedName)); - if (privData->dom->nsInfo->nsToPrefix.find(localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) - retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[localNamespaceURI]); - - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -}
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.cpp deleted file mode 100644 index d52c923..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCDocumentFragment.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDocumentFragment::Tmpl; - -JSStaticValue JSCDocumentFragment::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDocumentFragment::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.h deleted file mode 100644 index 6beed81..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCDocumentFragment_h -#define JSCDocumentFragment_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDocumentFragment { -public: - struct JSCDocumentFragmentPrivate { - JSCDOM* dom; - Arabica::DOM::DocumentFragment<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDocumentFragmentPrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DocumentFragment"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDocumentFragment_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.cpp deleted file mode 100644 index 1c75dcd..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCDocumentType.h" -#include "JSCNamedNodeMap.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDocumentType::Tmpl; - -JSStaticValue JSCDocumentType::staticValues[] = { - { "name", nameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "entities", entitiesAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "notations", notationsAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "publicId", publicIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "systemId", systemIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "internalSubset", internalSubsetAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDocumentType::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCDocumentType::nameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCDocumentType::entitiesAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - - Arabica::DOM::NamedNodeMap<std::string>* arabicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->nativeObj->getEntities()); - - JSClassRef arbaicaRetClass = JSCNamedNodeMap::getTmpl(); - - struct JSCNamedNodeMap::JSCNamedNodeMapPrivate* retPrivData = new JSCNamedNodeMap::JSCNamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocumentType::notationsAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - - Arabica::DOM::NamedNodeMap<std::string>* arabicaRet = new Arabica::DOM::NamedNodeMap<std::string>(privData->nativeObj->getNotations()); - - JSClassRef arbaicaRetClass = JSCNamedNodeMap::getTmpl(); - - struct JSCNamedNodeMap::JSCNamedNodeMapPrivate* retPrivData = new JSCNamedNodeMap::JSCNamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocumentType::publicIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPublicId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCDocumentType::systemIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getSystemId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCDocumentType::internalSubsetAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getInternalSubset().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.h deleted file mode 100644 index d2077cf..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCDocumentType_h -#define JSCDocumentType_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDocumentType { -public: - struct JSCDocumentTypePrivate { - JSCDOM* dom; - Arabica::DOM::DocumentType<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDocumentTypePrivate); - - - static JSValueRef nameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef entitiesAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef notationsAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef publicIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef systemIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef internalSubsetAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DocumentType"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDocumentType_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.cpp deleted file mode 100644 index 33f6f70..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.cpp +++ /dev/null @@ -1,589 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCAttr.h" -#include "JSCElement.h" -#include "JSCNode.h" -#include "JSCNodeList.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCElement::Tmpl; - -JSStaticValue JSCElement::staticValues[] = { - { "tagName", tagNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCElement::staticFunctions[] = { - { "getAttribute", getAttributeCallback, kJSPropertyAttributeDontDelete }, - { "setAttribute", setAttributeCallback, kJSPropertyAttributeDontDelete }, - { "removeAttribute", removeAttributeCallback, kJSPropertyAttributeDontDelete }, - { "getAttributeNode", getAttributeNodeCallback, kJSPropertyAttributeDontDelete }, - { "setAttributeNode", setAttributeNodeCallback, kJSPropertyAttributeDontDelete }, - { "removeAttributeNode", removeAttributeNodeCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagName", getElementsByTagNameCallback, kJSPropertyAttributeDontDelete }, - { "getAttributeNS", getAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { "setAttributeNS", setAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { "removeAttributeNS", removeAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { "getAttributeNodeNS", getAttributeNodeNSCallback, kJSPropertyAttributeDontDelete }, - { "setAttributeNodeNS", setAttributeNodeNSCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagNameNS", getElementsByTagNameNSCallback, kJSPropertyAttributeDontDelete }, - { "hasAttribute", hasAttributeCallback, kJSPropertyAttributeDontDelete }, - { "hasAttributeNS", hasAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCElement::tagNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getTagName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCElement::getAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - std::string retVal = privData->nativeObj->getAttribute(localName); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - - privData->nativeObj->setAttribute(localName, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::removeAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - privData->nativeObj->removeAttribute(localName); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->getAttributeNode(localName)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttributeNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCAttr::getTmpl())) { - Arabica::DOM::Attr<std::string>* localNewAttr = ((struct JSCAttr::JSCAttrPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->setAttributeNode(*localNewAttr)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttributeNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::removeAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCAttr::getTmpl())) { - Arabica::DOM::Attr<std::string>* localOldAttr = ((struct JSCAttr::JSCAttrPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->removeAttributeNode(*localOldAttr)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeAttributeNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagName(localName)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagName"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - std::string retVal = privData->nativeObj->getAttributeNS(localNamespaceURI, localLocalName); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1]) && - JSValueIsString(ctx, arguments[2])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, arguments[2], exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - - privData->nativeObj->setAttributeNS(localNamespaceURI, localQualifiedName, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::removeAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - privData->nativeObj->removeAttributeNS(localNamespaceURI, localLocalName); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->getAttributeNodeNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttributeNodeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCAttr::getTmpl())) { - Arabica::DOM::Attr<std::string>* localNewAttr = ((struct JSCAttr::JSCAttrPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->setAttributeNodeNS(*localNewAttr)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttributeNodeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::NodeList<std::string>* retVal = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getElementsByTagNameNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagNameNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::hasAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - bool retVal = privData->nativeObj->hasAttribute(localName); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::hasAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - bool retVal = privData->nativeObj->hasAttributeNS(localNamespaceURI, localLocalName); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.h deleted file mode 100644 index eab3696..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCElement_h -#define JSCElement_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCElement { -public: - struct JSCElementPrivate { - JSCDOM* dom; - Arabica::DOM::Element<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCElementPrivate); - - static JSValueRef getAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef tagNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Element"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCElement_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.cpp deleted file mode 100644 index 4dec699..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCEntity.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCEntity::Tmpl; - -JSStaticValue JSCEntity::staticValues[] = { - { "publicId", publicIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "systemId", systemIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "notationName", notationNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCEntity::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCEntity::publicIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCEntityPrivate* privData = (struct JSCEntityPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPublicId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCEntity::systemIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCEntityPrivate* privData = (struct JSCEntityPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getSystemId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCEntity::notationNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCEntityPrivate* privData = (struct JSCEntityPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNotationName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.h deleted file mode 100644 index c61510f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCEntity_h -#define JSCEntity_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCEntity { -public: - struct JSCEntityPrivate { - JSCDOM* dom; - Arabica::DOM::Entity<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCEntityPrivate); - - - static JSValueRef publicIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef systemIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef notationNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Entity"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCEntity_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.cpp deleted file mode 100644 index fe67b5d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCEntityReference.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCEntityReference::Tmpl; - -JSStaticValue JSCEntityReference::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCEntityReference::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.h deleted file mode 100644 index 9ed8980..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCEntityReference_h -#define JSCEntityReference_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCEntityReference { -public: - struct JSCEntityReferencePrivate { - JSCDOM* dom; - Arabica::DOM::EntityReference<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCEntityReferencePrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "EntityReference"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCEntityReference_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.cpp deleted file mode 100644 index 924f40f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCFloat32Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCFloat32Array::Tmpl; - -JSStaticValue JSCFloat32Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCFloat32Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCFloat32Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Float32Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Float32Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Float32Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat32Array::getTmpl())) { - - uscxml::Float32Array* localArray = ((struct JSCFloat32Array::JSCFloat32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float32Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float32Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Float32Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<float> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Float32Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Float32Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCFloat32Array::getTmpl(); - - struct JSCFloat32Array::JSCFloat32ArrayPrivate* retPrivData = new JSCFloat32Array::JSCFloat32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCFloat32Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCFloat32Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - - -JSValueRef JSCFloat32Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - float retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat32Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat32Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Float32Array* localArray = ((struct JSCFloat32Array::JSCFloat32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - float localValue = (float)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<float> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat32Array::getTmpl())) { - uscxml::Float32Array* localArray = ((struct JSCFloat32Array::JSCFloat32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<float> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat32Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Float32Array* retVal = new uscxml::Float32Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCFloat32Array::getTmpl(); - - struct JSCFloat32Array::JSCFloat32ArrayPrivate* retPrivData = new JSCFloat32Array::JSCFloat32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Float32Array* retVal = new uscxml::Float32Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCFloat32Array::getTmpl(); - - struct JSCFloat32Array::JSCFloat32ArrayPrivate* retPrivData = new JSCFloat32Array::JSCFloat32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.h deleted file mode 100644 index 0e7bbf9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCFloat32Array_h -#define JSCFloat32Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCFloat32Array { -public: - struct JSCFloat32ArrayPrivate { - JSCDOM* dom; - uscxml::Float32Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCFloat32ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Float32Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCFloat32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.cpp deleted file mode 100644 index a58bce9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCFloat64Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCFloat64Array::Tmpl; - -JSStaticValue JSCFloat64Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCFloat64Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCFloat64Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Float64Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Float64Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Float64Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat64Array::getTmpl())) { - - uscxml::Float64Array* localArray = ((struct JSCFloat64Array::JSCFloat64ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float64Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float64Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Float64Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<double> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Float64Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Float64Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCFloat64Array::getTmpl(); - - struct JSCFloat64Array::JSCFloat64ArrayPrivate* retPrivData = new JSCFloat64Array::JSCFloat64ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCFloat64Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCFloat64Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 8); -} - - -JSValueRef JSCFloat64Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - double retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat64Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat64Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Float64Array* localArray = ((struct JSCFloat64Array::JSCFloat64ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - double localValue = (double)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<double> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat64Array::getTmpl())) { - uscxml::Float64Array* localArray = ((struct JSCFloat64Array::JSCFloat64ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<double> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat64Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Float64Array* retVal = new uscxml::Float64Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCFloat64Array::getTmpl(); - - struct JSCFloat64Array::JSCFloat64ArrayPrivate* retPrivData = new JSCFloat64Array::JSCFloat64ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Float64Array* retVal = new uscxml::Float64Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCFloat64Array::getTmpl(); - - struct JSCFloat64Array::JSCFloat64ArrayPrivate* retPrivData = new JSCFloat64Array::JSCFloat64ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.h deleted file mode 100644 index 82f1f72..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCFloat64Array_h -#define JSCFloat64Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCFloat64Array { -public: - struct JSCFloat64ArrayPrivate { - JSCDOM* dom; - uscxml::Float64Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCFloat64ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Float64Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCFloat64Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.cpp deleted file mode 100644 index e887378..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCInt16Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCInt16Array::Tmpl; - -JSStaticValue JSCInt16Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCInt16Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCInt16Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Int16Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Int16Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Int16Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt16Array::getTmpl())) { - - uscxml::Int16Array* localArray = ((struct JSCInt16Array::JSCInt16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int16Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int16Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Int16Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<short> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Int16Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Int16Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCInt16Array::getTmpl(); - - struct JSCInt16Array::JSCInt16ArrayPrivate* retPrivData = new JSCInt16Array::JSCInt16ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCInt16Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCInt16Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - - -JSValueRef JSCInt16Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - short retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt16Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt16Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Int16Array* localArray = ((struct JSCInt16Array::JSCInt16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - short localValue = (short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<short> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt16Array::getTmpl())) { - uscxml::Int16Array* localArray = ((struct JSCInt16Array::JSCInt16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<short> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt16Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Int16Array* retVal = new uscxml::Int16Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCInt16Array::getTmpl(); - - struct JSCInt16Array::JSCInt16ArrayPrivate* retPrivData = new JSCInt16Array::JSCInt16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Int16Array* retVal = new uscxml::Int16Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCInt16Array::getTmpl(); - - struct JSCInt16Array::JSCInt16ArrayPrivate* retPrivData = new JSCInt16Array::JSCInt16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.h deleted file mode 100644 index f56c7b9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCInt16Array_h -#define JSCInt16Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCInt16Array { -public: - struct JSCInt16ArrayPrivate { - JSCDOM* dom; - uscxml::Int16Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCInt16ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Int16Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCInt16Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.cpp deleted file mode 100644 index b868e9b..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCInt32Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCInt32Array::Tmpl; - -JSStaticValue JSCInt32Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCInt32Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCInt32Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Int32Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Int32Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Int32Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt32Array::getTmpl())) { - - uscxml::Int32Array* localArray = ((struct JSCInt32Array::JSCInt32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int32Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int32Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Int32Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<long> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Int32Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Int32Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCInt32Array::getTmpl(); - - struct JSCInt32Array::JSCInt32ArrayPrivate* retPrivData = new JSCInt32Array::JSCInt32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCInt32Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCInt32Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - - -JSValueRef JSCInt32Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - long retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt32Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt32Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Int32Array* localArray = ((struct JSCInt32Array::JSCInt32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - long localValue = (long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<long> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt32Array::getTmpl())) { - uscxml::Int32Array* localArray = ((struct JSCInt32Array::JSCInt32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<long> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt32Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Int32Array* retVal = new uscxml::Int32Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCInt32Array::getTmpl(); - - struct JSCInt32Array::JSCInt32ArrayPrivate* retPrivData = new JSCInt32Array::JSCInt32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Int32Array* retVal = new uscxml::Int32Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCInt32Array::getTmpl(); - - struct JSCInt32Array::JSCInt32ArrayPrivate* retPrivData = new JSCInt32Array::JSCInt32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.h deleted file mode 100644 index 76bda20..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCInt32Array_h -#define JSCInt32Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCInt32Array { -public: - struct JSCInt32ArrayPrivate { - JSCDOM* dom; - uscxml::Int32Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCInt32ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Int32Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCInt32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp deleted file mode 100644 index 28bb6b4..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCInt8Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCInt8Array::Tmpl; - -JSStaticValue JSCInt8Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCInt8Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCInt8Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Int8Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Int8Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Int8Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt8Array::getTmpl())) { - - uscxml::Int8Array* localArray = ((struct JSCInt8Array::JSCInt8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int8Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int8Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Int8Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Int8Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Int8Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCInt8Array::getTmpl(); - - struct JSCInt8Array::JSCInt8ArrayPrivate* retPrivData = new JSCInt8Array::JSCInt8ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCInt8Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCInt8Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - - -JSValueRef JSCInt8Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - char retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt8Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt8Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Int8Array* localArray = ((struct JSCInt8Array::JSCInt8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - char localValue = (char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt8Array::getTmpl())) { - uscxml::Int8Array* localArray = ((struct JSCInt8Array::JSCInt8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt8Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Int8Array* retVal = new uscxml::Int8Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCInt8Array::getTmpl(); - - struct JSCInt8Array::JSCInt8ArrayPrivate* retPrivData = new JSCInt8Array::JSCInt8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Int8Array* retVal = new uscxml::Int8Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCInt8Array::getTmpl(); - - struct JSCInt8Array::JSCInt8ArrayPrivate* retPrivData = new JSCInt8Array::JSCInt8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.h deleted file mode 100644 index b46d4cb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCInt8Array_h -#define JSCInt8Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCInt8Array { -public: - struct JSCInt8ArrayPrivate { - JSCDOM* dom; - uscxml::Int8Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCInt8ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Int8Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCInt8Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.cpp deleted file mode 100644 index c0e53bf..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCNamedNodeMap.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNamedNodeMap::Tmpl; - -JSStaticValue JSCNamedNodeMap::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNamedNodeMap::staticFunctions[] = { - { "getNamedItem", getNamedItemCallback, kJSPropertyAttributeDontDelete }, - { "setNamedItem", setNamedItemCallback, kJSPropertyAttributeDontDelete }, - { "removeNamedItem", removeNamedItemCallback, kJSPropertyAttributeDontDelete }, - { "item", itemCallback, kJSPropertyAttributeDontDelete }, - { "getNamedItemNS", getNamedItemNSCallback, kJSPropertyAttributeDontDelete }, - { "setNamedItemNS", setNamedItemNSCallback, kJSPropertyAttributeDontDelete }, - { "removeNamedItemNS", removeNamedItemNSCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNamedNodeMap::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCNamedNodeMap::getNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->getNamedItem(localName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getNamedItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::setNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node<std::string>* localArg = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->setNamedItem(*localArg)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setNamedItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::removeNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->removeNamedItem(localName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeNamedItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->item(localIndex)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling item"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::getNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->getNamedItemNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getNamedItemNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::setNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node<std::string>* localArg = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->setNamedItemNS(*localArg)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setNamedItemNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::removeNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->removeNamedItemNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeNamedItemNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.h deleted file mode 100644 index 5b2f6d9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCNamedNodeMap_h -#define JSCNamedNodeMap_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNamedNodeMap { -public: - struct JSCNamedNodeMapPrivate { - JSCDOM* dom; - Arabica::DOM::NamedNodeMap<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNamedNodeMapPrivate); - - static JSValueRef getNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "NamedNodeMap"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNamedNodeMap_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.cpp deleted file mode 100644 index 7f9ddb0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.cpp +++ /dev/null @@ -1,565 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCDocument.h" -#include "JSCNode.h" -#include "JSCNodeList.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNode::Tmpl; - -JSStaticValue JSCNode::staticValues[] = { - { "nodeName", nodeNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "nodeValue", nodeValueAttrGetter, nodeValueAttrSetter, kJSPropertyAttributeDontDelete }, - { "nodeType", nodeTypeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "parentNode", parentNodeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "childNodes", childNodesAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "firstChild", firstChildAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "lastChild", lastChildAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "previousSibling", previousSiblingAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "nextSibling", nextSiblingAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "attributes", attributesCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ownerDocument", ownerDocumentAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "namespaceURI", namespaceURIAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "prefix", prefixAttrGetter, prefixAttrSetter, kJSPropertyAttributeDontDelete }, - { "localName", localNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "ELEMENT_NODE", ELEMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ATTRIBUTE_NODE", ATTRIBUTE_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "TEXT_NODE", TEXT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "CDATA_SECTION_NODE", CDATA_SECTION_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ENTITY_REFERENCE_NODE", ENTITY_REFERENCE_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ENTITY_NODE", ENTITY_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "PROCESSING_INSTRUCTION_NODE", PROCESSING_INSTRUCTION_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "COMMENT_NODE", COMMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "DOCUMENT_NODE", DOCUMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "DOCUMENT_TYPE_NODE", DOCUMENT_TYPE_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "DOCUMENT_FRAGMENT_NODE", DOCUMENT_FRAGMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "NOTATION_NODE", NOTATION_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNode::staticFunctions[] = { - { "insertBefore", insertBeforeCallback, kJSPropertyAttributeDontDelete }, - { "replaceChild", replaceChildCallback, kJSPropertyAttributeDontDelete }, - { "removeChild", removeChildCallback, kJSPropertyAttributeDontDelete }, - { "appendChild", appendChildCallback, kJSPropertyAttributeDontDelete }, - { "hasChildNodes", hasChildNodesCallback, kJSPropertyAttributeDontDelete }, - { "cloneNode", cloneNodeCallback, kJSPropertyAttributeDontDelete }, - { "normalize", normalizeCallback, kJSPropertyAttributeDontDelete }, - { "isSupported", isSupportedCallback, kJSPropertyAttributeDontDelete }, - { "hasAttributes", hasAttributesCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNode::nodeNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNodeName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCNode::nodeValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNodeValue().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCNode::nodeValueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalNodeValue = JSValueToStringCopy(ctx, value, exception); - size_t localNodeValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNodeValue); - char* localNodeValueBuffer = new char[localNodeValueMaxSize]; - JSStringGetUTF8CString(stringReflocalNodeValue, localNodeValueBuffer, localNodeValueMaxSize); - std::string localNodeValue(localNodeValueBuffer); - JSStringRelease(stringReflocalNodeValue); - free(localNodeValueBuffer); - - privData->nativeObj->setNodeValue(localNodeValue); - return true; -} - -JSValueRef JSCNode::nodeTypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getNodeType()); -} - - -JSValueRef JSCNode::parentNodeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getParentNode()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node<std::string>* arabicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getParentNode()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::childNodesAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - - Arabica::DOM::NodeList<std::string>* arabicaRet = new Arabica::DOM::NodeList<std::string>(privData->nativeObj->getChildNodes()); - - JSClassRef arbaicaRetClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::firstChildAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getFirstChild()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node<std::string>* arabicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getFirstChild()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::lastChildAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getLastChild()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node<std::string>* arabicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getLastChild()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::previousSiblingAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getPreviousSibling()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node<std::string>* arabicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getPreviousSibling()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::nextSiblingAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getNextSibling()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node<std::string>* arabicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->getNextSibling()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::ownerDocumentAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getOwnerDocument()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Document<std::string>* arabicaRet = new Arabica::DOM::Document<std::string>(privData->nativeObj->getOwnerDocument()); - - JSClassRef arbaicaRetClass = JSCDocument::getTmpl(); - - struct JSCDocument::JSCDocumentPrivate* retPrivData = new JSCDocument::JSCDocumentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::namespaceURIAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNamespaceURI().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCNode::prefixAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPrefix().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCNode::prefixAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalPrefix = JSValueToStringCopy(ctx, value, exception); - size_t localPrefixMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalPrefix); - char* localPrefixBuffer = new char[localPrefixMaxSize]; - JSStringGetUTF8CString(stringReflocalPrefix, localPrefixBuffer, localPrefixMaxSize); - std::string localPrefix(localPrefixBuffer); - JSStringRelease(stringReflocalPrefix); - free(localPrefixBuffer); - - privData->nativeObj->setPrefix(localPrefix); - return true; -} - -JSValueRef JSCNode::localNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getLocalName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - -JSValueRef JSCNode::ELEMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - -JSValueRef JSCNode::ATTRIBUTE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - -JSValueRef JSCNode::TEXT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 3); -} - -JSValueRef JSCNode::CDATA_SECTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - -JSValueRef JSCNode::ENTITY_REFERENCE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 5); -} - -JSValueRef JSCNode::ENTITY_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 6); -} - -JSValueRef JSCNode::PROCESSING_INSTRUCTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 7); -} - -JSValueRef JSCNode::COMMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 8); -} - -JSValueRef JSCNode::DOCUMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 9); -} - -JSValueRef JSCNode::DOCUMENT_TYPE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 10); -} - -JSValueRef JSCNode::DOCUMENT_FRAGMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 11); -} - -JSValueRef JSCNode::NOTATION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 12); -} - - -JSValueRef JSCNode::insertBeforeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl()) && - JSValueIsObject(ctx, arguments[1]) && JSValueIsObjectOfClass(ctx, arguments[1], JSCNode::getTmpl())) { - Arabica::DOM::Node<std::string>* localNewChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - Arabica::DOM::Node<std::string>* localRefChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], exception)))->nativeObj; - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->insertBefore(*localNewChild, *localRefChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling insertBefore"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::replaceChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl()) && - JSValueIsObject(ctx, arguments[1]) && JSValueIsObjectOfClass(ctx, arguments[1], JSCNode::getTmpl())) { - Arabica::DOM::Node<std::string>* localNewChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - Arabica::DOM::Node<std::string>* localOldChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], exception)))->nativeObj; - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->replaceChild(*localNewChild, *localOldChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling replaceChild"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::removeChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node<std::string>* localOldChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->removeChild(*localOldChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeChild"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::appendChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node<std::string>* localNewChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->appendChild(*localNewChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling appendChild"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::hasChildNodesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - bool retVal = privData->nativeObj->hasChildNodes(); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasChildNodes"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::cloneNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsBoolean(ctx, arguments[0])) { - bool localDeep = JSValueToBoolean(ctx, arguments[0]); - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->cloneNode(localDeep)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling cloneNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::normalizeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - privData->nativeObj->normalize(); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling normalize"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::isSupportedCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalFeature = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localFeatureMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalFeature); - char* localFeatureBuffer = new char[localFeatureMaxSize]; - JSStringGetUTF8CString(stringReflocalFeature, localFeatureBuffer, localFeatureMaxSize); - std::string localFeature(localFeatureBuffer); - JSStringRelease(stringReflocalFeature); - free(localFeatureBuffer); - - JSStringRef stringReflocalVersion = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localVersionMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalVersion); - char* localVersionBuffer = new char[localVersionMaxSize]; - JSStringGetUTF8CString(stringReflocalVersion, localVersionBuffer, localVersionMaxSize); - std::string localVersion(localVersionBuffer); - JSStringRelease(stringReflocalVersion); - free(localVersionBuffer); - - - bool retVal = privData->nativeObj->isSupported(localFeature, localVersion); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling isSupported"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::hasAttributesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - bool retVal = privData->nativeObj->hasAttributes(); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasAttributes"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.h deleted file mode 100644 index 91daa79..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCNode_h -#define JSCNode_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNode { -public: - struct JSCNodePrivate { - JSCDOM* dom; - Arabica::DOM::Node<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNodePrivate); - - static JSValueRef insertBeforeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef replaceChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef appendChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasChildNodesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef cloneNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef normalizeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef isSupportedCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasAttributesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef nodeNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef nodeValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool nodeValueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef nodeTypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef parentNodeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef childNodesAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef firstChildAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef lastChildAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef previousSiblingAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef nextSiblingAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef attributesCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ownerDocumentAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef namespaceURIAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef prefixAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool prefixAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef localNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ELEMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ATTRIBUTE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef TEXT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef CDATA_SECTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ENTITY_REFERENCE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ENTITY_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef PROCESSING_INSTRUCTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef COMMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef DOCUMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef DOCUMENT_TYPE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef DOCUMENT_FRAGMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef NOTATION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Node"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNode_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeCustom.cpp deleted file mode 100644 index b135044..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeCustom.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "JSCNode.h" -#include "JSCNamedNodeMap.h" - -namespace Arabica { -namespace DOM { - -JSValueRef JSCNode::attributesCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (!privData->nativeObj->hasAttributes()) { - return JSValueMakeUndefined(ctx); - } - - Arabica::DOM::NamedNodeMap<std::string>* retVal = new Arabica::DOM::NamedNodeMap<std::string>(privData->nativeObj->getAttributes()); - JSClassRef retClass = JSCNamedNodeMap::getTmpl(); - - struct JSCNamedNodeMap::JSCNamedNodeMapPrivate* retPrivData = new JSCNamedNodeMap::JSCNamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; -} - - -} -}
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.cpp deleted file mode 100644 index 6a3acfb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCNode.h" -#include "JSCNodeList.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNodeList::Tmpl; - -JSStaticValue JSCNodeList::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNodeList::staticFunctions[] = { - { "item", itemCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNodeList::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCNodeList::itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->item(localIndex)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling item"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.h deleted file mode 100644 index 2b5b3bc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCNodeList_h -#define JSCNodeList_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNodeList { -public: - struct JSCNodeListPrivate { - JSCDOM* dom; - Arabica::DOM::NodeList<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNodeListPrivate); - - static JSValueRef itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "NodeList"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNodeList_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeListCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeListCustom.cpp deleted file mode 100644 index 91c18e5..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeListCustom.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "JSCNodeList.h" -#include "JSCElement.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -bool JSCNodeList::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return false; - } - - int index = boost::lexical_cast<int>(propName); - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->getLength() < index) { - return false; - } - - return true; -} - -JSValueRef JSCNodeList::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return JSValueMakeUndefined(ctx); - } - - int index = boost::lexical_cast<int>(propName); - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(object); - if (privData->nativeObj->getLength() < index) { - return JSValueMakeUndefined(ctx); - } - - switch(privData->nativeObj->item(index).getNodeType()) { - case Node_base::ELEMENT_NODE: { - Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->item(index)); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - break; - } - default: { - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(privData->nativeObj->item(index)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - } - } - - return JSValueMakeUndefined(ctx); -} - -} -}
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp deleted file mode 100644 index cf4a8de..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCNodeSet.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNodeSet::Tmpl; - -JSStaticValue JSCNodeSet::staticValues[] = { - { "size", sizeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "empty", emptyAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNodeSet::staticFunctions[] = { - { "toDocumentOrder", toDocumentOrderCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNodeSet::sizeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->size()); -} - - -JSValueRef JSCNodeSet::emptyAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeBoolean(ctx, privData->nativeObj->empty()); -} - - -JSValueRef JSCNodeSet::toDocumentOrderCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - privData->nativeObj->to_document_order(); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling toDocumentOrder"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.h deleted file mode 100644 index a384ade..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCNodeSet_h -#define JSCNodeSet_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNodeSet { -public: - struct JSCNodeSetPrivate { - JSCDOM* dom; - Arabica::XPath::NodeSet<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNodeSetPrivate); - - static JSValueRef toDocumentOrderCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef sizeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef emptyAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "NodeSet"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNodeSet_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSetCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSetCustom.cpp deleted file mode 100644 index 6de5793..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSetCustom.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "JSCNodeSet.h" -#include "JSCElement.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - - -bool JSCNodeSet::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return false; - } - - int index = boost::lexical_cast<int>(propName); - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->size() < index) { - return false; - } - - return true; -} - -JSValueRef JSCNodeSet::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return JSValueMakeUndefined(ctx); - } - - int index = boost::lexical_cast<int>(propName); - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - if (privData->nativeObj->size() <= index) { - return JSValueMakeUndefined(ctx); - } - - switch((*privData->nativeObj)[index].getNodeType()) { - case Node_base::ELEMENT_NODE: { - Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>((*privData->nativeObj)[index]); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - break; - } - default: { - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>((*privData->nativeObj)[index]); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - } - } - - return JSValueMakeUndefined(ctx); -} - -} -}
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp deleted file mode 100644 index 6ff9079..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCNode.h" -#include "JSCNotation.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNotation::Tmpl; - -JSStaticValue JSCNotation::staticValues[] = { - { "publicId", publicIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "systemId", systemIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNotation::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCNotation::publicIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNotationPrivate* privData = (struct JSCNotationPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPublicId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCNotation::systemIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNotationPrivate* privData = (struct JSCNotationPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getSystemId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.h deleted file mode 100644 index 5238bbc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCNotation_h -#define JSCNotation_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNotation { -public: - struct JSCNotationPrivate { - JSCDOM* dom; - Arabica::DOM::Notation<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNotationPrivate); - - - static JSValueRef publicIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef systemIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Notation"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNotation_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp deleted file mode 100644 index c712c60..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCNode.h" -#include "JSCProcessingInstruction.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCProcessingInstruction::Tmpl; - -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 object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCProcessingInstructionPrivate* privData = (struct JSCProcessingInstructionPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getTarget().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCProcessingInstruction::dataAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCProcessingInstructionPrivate* privData = (struct JSCProcessingInstructionPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getData().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCProcessingInstruction::dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCProcessingInstructionPrivate* privData = (struct JSCProcessingInstructionPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, value, exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - privData->nativeObj->setData(localData); - return true; -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.h deleted file mode 100644 index fbee5fd..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCProcessingInstruction_h -#define JSCProcessingInstruction_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCProcessingInstruction { -public: - struct JSCProcessingInstructionPrivate { - JSCDOM* dom; - Arabica::DOM::ProcessingInstruction<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCProcessingInstructionPrivate); - - - static JSValueRef targetAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef dataAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "ProcessingInstruction"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCProcessingInstruction_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.cpp deleted file mode 100644 index 174b704..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCNode.h" -#include "JSCSCXMLEvent.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCSCXMLEvent::Tmpl; - -JSStaticValue JSCSCXMLEvent::staticValues[] = { - { "type", typeCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "name", nameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "origin", originAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "origintype", origintypeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "raw", rawAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "dom", domAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "sendid", sendidCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "invokeid", invokeidAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "INTERNAL", INTERNALConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "EXTERNAL", EXTERNALConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "PLATFORM", PLATFORMConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCSCXMLEvent::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCSCXMLEvent::nameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->name.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::originAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->origin.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->origin.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::origintypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->origintype.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->origintype.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::rawAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->raw.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->raw.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::domAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->dom) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node<std::string>* arabicaRet = new Arabica::DOM::Node<std::string>(privData->nativeObj->dom); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCSCXMLEvent::invokeidAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->invokeid.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->invokeid.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - -JSValueRef JSCSCXMLEvent::INTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - -JSValueRef JSCSCXMLEvent::EXTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - -JSValueRef JSCSCXMLEvent::PLATFORMConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 3); -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h deleted file mode 100644 index 1d8021d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCSCXMLEvent_h -#define JSCSCXMLEvent_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCSCXMLEvent { -public: - struct JSCSCXMLEventPrivate { - JSCDOM* dom; - uscxml::Event* nativeObj; - }; - - JSC_DESTRUCTOR(JSCSCXMLEventPrivate); - - - static JSValueRef typeCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef nameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef originAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef origintypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef rawAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef domAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef sendidCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef invokeidAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef INTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef EXTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef PLATFORMConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "SCXMLEvent"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCSCXMLEvent_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEventCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEventCustom.cpp deleted file mode 100644 index 9d128b6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEventCustom.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "JSCSCXMLEvent.h" - -namespace Arabica { -namespace DOM { - -JSValueRef JSCSCXMLEvent::typeCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(thisObj); - JSStringRef stringRef; - - switch (privData->nativeObj->eventType) { - case uscxml::Event::INTERNAL: - stringRef = JSStringCreateWithUTF8CString("internal"); - break; - case uscxml::Event::EXTERNAL: - stringRef = JSStringCreateWithUTF8CString("external"); - break; - case uscxml::Event::PLATFORM: - stringRef = JSStringCreateWithUTF8CString("platform"); - break; - default: - stringRef = JSStringCreateWithUTF8CString("undefined"); - break; - } - - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - -JSValueRef JSCSCXMLEvent::sendidCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(thisObj); - JSStringRef stringRef; - - if (privData->nativeObj->sendid.length() == 0 || privData->nativeObj->hideSendId) { - return JSValueMakeUndefined(ctx); - } else { - stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->sendid.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; - } -} - -} -}
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.cpp deleted file mode 100644 index 9bd3d73..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCStorage.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCStorage::Tmpl; - -JSStaticValue JSCStorage::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCStorage::staticFunctions[] = { - { "key", keyCallback, kJSPropertyAttributeDontDelete }, - { "getItem", getItemCallback, kJSPropertyAttributeDontDelete }, - { "setItem", setItemCallback, kJSPropertyAttributeDontDelete }, - { "removeItem", removeItemCallback, kJSPropertyAttributeDontDelete }, - { "clear", clearCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCStorage::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCStorage::keyCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - std::string retVal = privData->nativeObj->key(localIndex); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling key"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::getItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalKey = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localKeyMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalKey); - char* localKeyBuffer = new char[localKeyMaxSize]; - JSStringGetUTF8CString(stringReflocalKey, localKeyBuffer, localKeyMaxSize); - std::string localKey(localKeyBuffer); - JSStringRelease(stringReflocalKey); - free(localKeyBuffer); - - - std::string retVal = privData->nativeObj->getItem(localKey); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::setItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalKey = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localKeyMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalKey); - char* localKeyBuffer = new char[localKeyMaxSize]; - JSStringGetUTF8CString(stringReflocalKey, localKeyBuffer, localKeyMaxSize); - std::string localKey(localKeyBuffer); - JSStringRelease(stringReflocalKey); - free(localKeyBuffer); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - - privData->nativeObj->setItem(localKey, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::removeItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalKey = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localKeyMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalKey); - char* localKeyBuffer = new char[localKeyMaxSize]; - JSStringGetUTF8CString(stringReflocalKey, localKeyBuffer, localKeyMaxSize); - std::string localKey(localKeyBuffer); - JSStringRelease(stringReflocalKey); - free(localKeyBuffer); - - - privData->nativeObj->removeItem(localKey); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::clearCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - privData->nativeObj->clear(); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling clear"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.h deleted file mode 100644 index dfb66b8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCStorage_h -#define JSCStorage_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCStorage { -public: - struct JSCStoragePrivate { - JSCDOM* dom; - uscxml::Storage* nativeObj; - }; - - JSC_DESTRUCTOR_KEEP_WRAPPED(JSCStoragePrivate); - - static JSValueRef keyCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef clearCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Storage"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCStorage_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.cpp deleted file mode 100644 index be25753..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCCharacterData.h" -#include "JSCText.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCText::Tmpl; - -JSStaticValue JSCText::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCText::staticFunctions[] = { - { "splitText", splitTextCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCText::splitTextCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCTextPrivate* privData = (struct JSCTextPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - Arabica::DOM::Text<std::string>* retVal = new Arabica::DOM::Text<std::string>(privData->nativeObj->splitText(localOffset)); - JSClassRef retClass = JSCText::getTmpl(); - - struct JSCText::JSCTextPrivate* retPrivData = new JSCText::JSCTextPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling splitText"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.h deleted file mode 100644 index 7ca23cb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCText_h -#define JSCText_h - -#include <string> -#include "DOM/Node.hpp" -#include "JSCCharacterData.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCText { -public: - struct JSCTextPrivate { - JSCDOM* dom; - Arabica::DOM::Text<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCTextPrivate); - - static JSValueRef splitTextCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Text"; - classDef.parentClass = JSCCharacterData::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCText_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCTypedArrayCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCTypedArrayCustom.cpp deleted file mode 100644 index b5122e8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCTypedArrayCustom.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "../../TypedArray.h" -#include "JSCArrayBuffer.h" -#include "JSCInt8Array.h" -#include "JSCUint8Array.h" -#include "JSCUint8ClampedArray.h" -#include "JSCInt16Array.h" -#include "JSCUint16Array.h" -#include "JSCInt32Array.h" -#include "JSCUint32Array.h" -#include "JSCFloat32Array.h" -#include "JSCFloat64Array.h" -#include "JSCDataView.h" - -#define JSC_VALUE_TO_STRING(name, stringName)\ -size_t name##MaxSize = JSStringGetMaximumUTF8CStringSize(name);\ -char* name##Buffer = new char[name##MaxSize];\ -JSStringGetUTF8CString(name, name##Buffer, name##MaxSize);\ -std::string stringName(name##Buffer);\ -free(name##Buffer);\ - - -#define JSC_TYPED_ARRAY_GET_PROP_RETURN(type)\ -size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName);\ -char* propBuffer = new char[propMaxSize];\ -JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize);\ -std::string propName(propBuffer);\ -free(propBuffer);\ -if (strcmp(propName.c_str(), "prototype") == 0) {\ - JSStringRef prototypeName = JSStringCreateWithUTF8CString(#type);\ - JSValueRef prototype = JSObjectGetProperty(ctx, JSContextGetGlobalObject(ctx), prototypeName, exception);\ - assert(!JSValueIsUndefined(ctx, prototype) && !JSValueIsNull(ctx, prototype));\ - JSStringRelease(prototypeName);\ - return prototype;\ -}\ -JSStaticValue* prop = JSC##type::staticValues;\ -while(prop->name) {\ - if (strcmp(propName.c_str(), prop->name) == 0) {\ - return (prop->getProperty)(ctx, object, propertyName, exception);\ - }\ - prop++;\ -}\ -\ -JSC##type::JSC##type##Private* privObj = (JSC##type::JSC##type##Private*)JSObjectGetPrivate(object);\ -if (!privObj)\ - return JSValueMakeUndefined(ctx);\ -\ -uscxml::type* array = ((JSC##type::JSC##type##Private*)JSObjectGetPrivate(object))->nativeObj;\ -std::string base = "0123456789";\ -if (propName.find_first_not_of(base) != std::string::npos) {\ - return JSValueMakeUndefined(ctx);\ -}\ -unsigned long index = boost::lexical_cast<unsigned long>(propName);\ -return JSValueMakeNumber(ctx, array->get(index)); - - - -#define JSC_TYPED_ARRAY_SET_PROP_RETURN(type)\ -if (!JSValueIsNumber(ctx, value)) {\ - return false;\ -}\ -size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName);\ -char* propBuffer = new char[propMaxSize];\ -JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize);\ -std::string propName(propBuffer);\ -free(propBuffer);\ -uscxml::type* array = ((JSC##type::JSC##type##Private*)JSObjectGetPrivate(object))->nativeObj;\ -std::string base = "0123456789";\ -if (propName.find_first_not_of(base) != std::string::npos) {\ - return JSValueMakeUndefined(ctx);\ -}\ -unsigned long index = boost::lexical_cast<unsigned long>(propName);\ -if (index >= array->getLength()) {\ - return false;\ -}\ -array->set(index, JSValueToNumber(ctx, value, exception));\ -return true; - - -#define JSC_TYPED_ARRAY_HAS_PROP_RETURN(type)\ -size_t propertyNameMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName);\ -char* propertyNameBuffer = new char[propertyNameMaxSize];\ -JSStringGetUTF8CString(propertyName, propertyNameBuffer, propertyNameMaxSize);\ -std::string propName(propertyNameBuffer);\ -free(propertyNameBuffer);\ -\ -if (strcmp(propName.c_str(), "prototype") == 0)\ - return true;\ -\ -if (strcmp(propName.c_str(), "length") == 0)\ - return true;\ -\ -JSStaticValue* prop = JSC##type::staticValues;\ -while(prop->name) {\ - if (strcmp(propName.c_str(), prop->name) == 0) {\ - return true;\ - }\ - prop++;\ -}\ -\ -JSC##type::JSC##type##Private* privObj = (JSC##type::JSC##type##Private*)JSObjectGetPrivate(object);\ -if (!privObj)\ - return false;\ -\ -uscxml::type* array = ((JSC##type::JSC##type##Private*)JSObjectGetPrivate(object))->nativeObj;\ -std::string base = "0123456789";\ -if (propName.find_first_not_of(base) != std::string::npos) {\ - return false;\ -}\ -unsigned long index = boost::lexical_cast<unsigned long>(propName);\ -if (array->getLength() > index)\ - return true;\ -return false;\ - -namespace Arabica { -namespace DOM { - -bool JSCInt8Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Int8Array); -} - -bool JSCInt16Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Int16Array); -} - -bool JSCInt32Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Int32Array); -} - -bool JSCUint8Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint8Array); -} - -bool JSCUint16Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint16Array); -} - -bool JSCUint32Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint32Array); -} - -bool JSCFloat32Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Float32Array); -} - -bool JSCFloat64Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Float64Array); -} - -bool JSCUint8ClampedArray::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint8ClampedArray); -} - -// ----------------- - -JSValueRef JSCInt8Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Int8Array); -} - -JSValueRef JSCInt16Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Int16Array); -} - -JSValueRef JSCInt32Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Int32Array); -} - -JSValueRef JSCUint8Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint8Array); -} - -JSValueRef JSCUint16Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint16Array); -} - -JSValueRef JSCUint32Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint32Array); -} - -JSValueRef JSCFloat32Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Float32Array); -} - -JSValueRef JSCFloat64Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Float64Array); -} - -JSValueRef JSCUint8ClampedArray::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint8ClampedArray); -} - -// ---------------- - -bool JSCInt8Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Int8Array); -} - -bool JSCInt16Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Int16Array); -} - -bool JSCInt32Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Int32Array); -} - -bool JSCUint8Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint8Array); -} - -bool JSCUint16Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint16Array); -} - -bool JSCUint32Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint32Array); -} - -bool JSCFloat32Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Float32Array); -} - -bool JSCFloat64Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Float64Array); -} - -bool JSCUint8ClampedArray::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint8ClampedArray); -} - - -} -}
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.cpp deleted file mode 100644 index d869d1e..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint16Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint16Array::Tmpl; - -JSStaticValue JSCUint16Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint16Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint16Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint16Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint16Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint16Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint16Array::getTmpl())) { - - uscxml::Uint16Array* localArray = ((struct JSCUint16Array::JSCUint16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint16Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint16Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint16Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<unsigned short> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint16Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint16Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint16Array::getTmpl(); - - struct JSCUint16Array::JSCUint16ArrayPrivate* retPrivData = new JSCUint16Array::JSCUint16ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint16Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint16Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - - -JSValueRef JSCUint16Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned short retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint16Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint16Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint16Array* localArray = ((struct JSCUint16Array::JSCUint16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned short localValue = (unsigned short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<unsigned short> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint16Array::getTmpl())) { - uscxml::Uint16Array* localArray = ((struct JSCUint16Array::JSCUint16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<unsigned short> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint16Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint16Array* retVal = new uscxml::Uint16Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint16Array::getTmpl(); - - struct JSCUint16Array::JSCUint16ArrayPrivate* retPrivData = new JSCUint16Array::JSCUint16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint16Array* retVal = new uscxml::Uint16Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint16Array::getTmpl(); - - struct JSCUint16Array::JSCUint16ArrayPrivate* retPrivData = new JSCUint16Array::JSCUint16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.h deleted file mode 100644 index 19ff639..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCUint16Array_h -#define JSCUint16Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint16Array { -public: - struct JSCUint16ArrayPrivate { - JSCDOM* dom; - uscxml::Uint16Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint16ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint16Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint16Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.cpp deleted file mode 100644 index 8fbefb3..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint32Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint32Array::Tmpl; - -JSStaticValue JSCUint32Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint32Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint32Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint32Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint32Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint32Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint32Array::getTmpl())) { - - uscxml::Uint32Array* localArray = ((struct JSCUint32Array::JSCUint32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint32Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint32Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint32Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<unsigned long> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint32Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint32Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint32Array::getTmpl(); - - struct JSCUint32Array::JSCUint32ArrayPrivate* retPrivData = new JSCUint32Array::JSCUint32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint32Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint32Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - - -JSValueRef JSCUint32Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned long retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint32Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint32Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint32Array* localArray = ((struct JSCUint32Array::JSCUint32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localValue = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<unsigned long> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint32Array::getTmpl())) { - uscxml::Uint32Array* localArray = ((struct JSCUint32Array::JSCUint32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<unsigned long> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint32Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint32Array* retVal = new uscxml::Uint32Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint32Array::getTmpl(); - - struct JSCUint32Array::JSCUint32ArrayPrivate* retPrivData = new JSCUint32Array::JSCUint32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint32Array* retVal = new uscxml::Uint32Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint32Array::getTmpl(); - - struct JSCUint32Array::JSCUint32ArrayPrivate* retPrivData = new JSCUint32Array::JSCUint32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.h deleted file mode 100644 index 5d6e371..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCUint32Array_h -#define JSCUint32Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint32Array { -public: - struct JSCUint32ArrayPrivate { - JSCDOM* dom; - uscxml::Uint32Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint32ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint32Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.cpp deleted file mode 100644 index fbdbb14..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint8Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint8Array::Tmpl; - -JSStaticValue JSCUint8Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint8Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint8Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint8Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint8Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint8Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8Array::getTmpl())) { - - uscxml::Uint8Array* localArray = ((struct JSCUint8Array::JSCUint8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint8Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<unsigned char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint8Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint8Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint8Array::getTmpl(); - - struct JSCUint8Array::JSCUint8ArrayPrivate* retPrivData = new JSCUint8Array::JSCUint8ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint8Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint8Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - - -JSValueRef JSCUint8Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned char retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint8Array* localArray = ((struct JSCUint8Array::JSCUint8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned char localValue = (unsigned char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<unsigned char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8Array::getTmpl())) { - uscxml::Uint8Array* localArray = ((struct JSCUint8Array::JSCUint8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<unsigned char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint8Array* retVal = new uscxml::Uint8Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint8Array::getTmpl(); - - struct JSCUint8Array::JSCUint8ArrayPrivate* retPrivData = new JSCUint8Array::JSCUint8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint8Array* retVal = new uscxml::Uint8Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint8Array::getTmpl(); - - struct JSCUint8Array::JSCUint8ArrayPrivate* retPrivData = new JSCUint8Array::JSCUint8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.h deleted file mode 100644 index af9e79f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCUint8Array_h -#define JSCUint8Array_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint8Array { -public: - struct JSCUint8ArrayPrivate { - JSCDOM* dom; - uscxml::Uint8Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint8ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint8Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint8Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.cpp deleted file mode 100644 index 848a507..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint8ClampedArray.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint8ClampedArray::Tmpl; - -JSStaticValue JSCUint8ClampedArray::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint8ClampedArray::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint8ClampedArray::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint8ClampedArray* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint8ClampedArray(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint8ClampedArray(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8ClampedArray::getTmpl())) { - - uscxml::Uint8ClampedArray* localArray = ((struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8ClampedArray(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8ClampedArray(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint8ClampedArray(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector<unsigned char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint8ClampedArray(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint8ClampedArray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint8ClampedArray::getTmpl(); - - struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate* retPrivData = new JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint8ClampedArray::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint8ClampedArray::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - - -JSValueRef JSCUint8ClampedArray::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned char retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8ClampedArray::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8ClampedArray::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint8ClampedArray* localArray = ((struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned char localValue = (unsigned char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector<unsigned char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8ClampedArray::getTmpl())) { - uscxml::Uint8ClampedArray* localArray = ((struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector<unsigned char> localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8ClampedArray::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint8ClampedArray* retVal = new uscxml::Uint8ClampedArray(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint8ClampedArray::getTmpl(); - - struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate* retPrivData = new JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint8ClampedArray* retVal = new uscxml::Uint8ClampedArray(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint8ClampedArray::getTmpl(); - - struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate* retPrivData = new JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.h deleted file mode 100644 index 1558e48..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCUint8ClampedArray_h -#define JSCUint8ClampedArray_h - -#include <string> -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint8ClampedArray { -public: - struct JSCUint8ClampedArrayPrivate { - JSCDOM* dom; - uscxml::Uint8ClampedArray* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint8ClampedArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint8ClampedArray"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint8ClampedArray_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.cpp deleted file mode 100644 index eb443f6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ -#include "JSCNodeSet.h" -#include "JSCXPathResult.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCXPathResult::Tmpl; - -JSStaticValue JSCXPathResult::staticValues[] = { - { "numberValue", numberValueAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "stringValue", stringValueAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "booleanValue", booleanValueAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "singleNodeValue", singleNodeValueCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCXPathResult::staticFunctions[] = { - { "asNodeSet", asNodeSetCallback, kJSPropertyAttributeDontDelete }, - { "asBool", asBoolCallback, kJSPropertyAttributeDontDelete }, - { "asString", asStringCallback, kJSPropertyAttributeDontDelete }, - { "asNumber", asNumberCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCXPathResult::numberValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->asNumber()); -} - - -JSValueRef JSCXPathResult::stringValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->asString().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCXPathResult::booleanValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeBoolean(ctx, privData->nativeObj->asBool()); -} - - -JSValueRef JSCXPathResult::asNodeSetCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - Arabica::XPath::NodeSet<std::string>* retVal = new Arabica::XPath::NodeSet<std::string>(privData->nativeObj->asNodeSet()); - JSClassRef retClass = JSCNodeSet::getTmpl(); - - struct JSCNodeSet::JSCNodeSetPrivate* retPrivData = new JSCNodeSet::JSCNodeSetPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asNodeSet"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCXPathResult::asBoolCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - bool retVal = privData->nativeObj->asBool(); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asBool"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCXPathResult::asStringCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - std::string retVal = privData->nativeObj->asString(); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asString"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCXPathResult::asNumberCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - double retVal = privData->nativeObj->asNumber(); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asNumber"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.h deleted file mode 100644 index e145dc1..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#ifndef JSCXPathResult_h -#define JSCXPathResult_h - -#include <string> -#include "DOM/Node.hpp" -#include <JavaScriptCore/JavaScriptCore.h> -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCXPathResult { -public: - struct JSCXPathResultPrivate { - JSCDOM* dom; - Arabica::XPath::XPathValue<std::string>* nativeObj; - }; - - JSC_DESTRUCTOR(JSCXPathResultPrivate); - - static JSValueRef asNodeSetCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef asBoolCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef asStringCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef asNumberCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef numberValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef stringValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef booleanValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef singleNodeValueCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "XPathResult"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCXPathResult_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResultCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResultCustom.cpp deleted file mode 100644 index 42b4ea1..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResultCustom.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program 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. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see <http://www.opensource.org/licenses/bsd-license>. - * @endcond - */ - -#include "JSCXPathResult.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSValueRef JSCXPathResult::singleNodeValueCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - Arabica::XPath::NodeSet<std::string> nodeSet = privData->nativeObj->asNodeSet(); - if (nodeSet.size() == 0) - return JSValueMakeUndefined(ctx); - - Arabica::DOM::Node<std::string>* retVal = new Arabica::DOM::Node<std::string>(nodeSet[0]); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; -} - -} -}
\ No newline at end of file |