Abstraction around a SpiderMonkey JSContext. More...
#include <ScriptInterface.h>
Classes | |
| class | StructuredClone |
| Structured clones are a way to serialize 'simple' JS values into a buffer that can safely be passed between contexts and runtimes and threads. More... | |
Public Member Functions | |
| ScriptInterface (const char *nativeScopeName, const char *debugName, const shared_ptr< ScriptRuntime > &runtime) | |
| Constructor. | |
| ~ScriptInterface () | |
| void | SetCallbackData (void *cbdata) |
| JSContext * | GetContext () const |
| JSRuntime * | GetRuntime () const |
| void | ReplaceNondeterministicFunctions (boost::rand48 &rng) |
| jsval | CallConstructor (jsval ctor, jsval arg) |
| Call a constructor function, equivalent to JS "new ctor(arg)". | |
| jsval | NewObjectFromConstructor (jsval ctor) |
| Create an object as with CallConstructor except don't actually execute the constructor function. | |
| bool | CallFunctionVoid (jsval val, const char *name) |
| Call the named property on the given object, with void return type and 0 arguments. | |
| template<typename T0 > | |
| bool | CallFunctionVoid (jsval val, const char *name, const T0 &a0) |
| Call the named property on the given object, with void return type and 1 argument. | |
| template<typename T0 , typename T1 > | |
| bool | CallFunctionVoid (jsval val, const char *name, const T0 &a0, const T1 &a1) |
| Call the named property on the given object, with void return type and 2 arguments. | |
| template<typename T0 , typename T1 , typename T2 > | |
| bool | CallFunctionVoid (jsval val, const char *name, const T0 &a0, const T1 &a1, const T2 &a2) |
| Call the named property on the given object, with void return type and 3 arguments. | |
| template<typename R > | |
| bool | CallFunction (jsval val, const char *name, R &ret) |
| Call the named property on the given object, with return type R and 0 arguments. | |
| template<typename T0 , typename R > | |
| bool | CallFunction (jsval val, const char *name, const T0 &a0, R &ret) |
| Call the named property on the given object, with return type R and 1 argument. | |
| template<typename T0 , typename T1 , typename R > | |
| bool | CallFunction (jsval val, const char *name, const T0 &a0, const T1 &a1, R &ret) |
| Call the named property on the given object, with return type R and 2 arguments. | |
| template<typename T0 , typename T1 , typename T2 , typename R > | |
| bool | CallFunction (jsval val, const char *name, const T0 &a0, const T1 &a1, const T2 &a2, R &ret) |
| Call the named property on the given object, with return type R and 3 arguments. | |
| template<typename T0 , typename T1 , typename T2 , typename T3 , typename R > | |
| bool | CallFunction (jsval val, const char *name, const T0 &a0, const T1 &a1, const T2 &a2, const T3 &a3, R &ret) |
| Call the named property on the given object, with return type R and 4 arguments. | |
| jsval | GetGlobalObject () |
| JSClass * | GetGlobalClass () |
| template<typename T > | |
| bool | SetGlobal (const char *name, const T &value, bool replace=false) |
| Set the named property on the global object. | |
| template<typename T > | |
| bool | SetProperty (jsval obj, const char *name, const T &value, bool constant=false, bool enumerate=true) |
| Set the named property on the given object. | |
| template<typename T > | |
| bool | SetPropertyInt (jsval obj, int name, const T &value, bool constant=false, bool enumerate=true) |
| Set the integer-named property on the given object. | |
| template<typename T > | |
| bool | GetProperty (jsval obj, const char *name, T &out) |
| Get the named property on the given object. | |
| template<typename T > | |
| bool | GetPropertyInt (jsval obj, int name, T &out) |
| Get the integer-named property on the given object. | |
| bool | HasProperty (jsval obj, const char *name) |
| Check the named property has been defined on the given object. | |
| bool | EnumeratePropertyNamesWithPrefix (jsval obj, const char *prefix, std::vector< std::string > &out) |
| bool | SetPrototype (jsval obj, jsval proto) |
| bool | FreezeObject (jsval obj, bool deep) |
| bool | Eval (const char *code) |
| template<typename T , typename CHAR > | |
| bool | Eval (const CHAR *code, T &out) |
| std::wstring | ToString (jsval obj, bool pretty=false) |
| CScriptValRooted | ParseJSON (const std::string &string_utf8) |
| Parse a UTF-8-encoded JSON string. | |
| CScriptValRooted | ReadJSONFile (const VfsPath &path) |
| Read a JSON file. | |
| std::string | StringifyJSON (jsval obj, bool indent=true) |
| Stringify to a JSON string, UTF-8 encoded. | |
| void | ReportError (const char *msg) |
| Report the given error message through the JS error reporting mechanism, and throw a JS exception. | |
| bool | LoadScript (const VfsPath &filename, const std::string &code) |
| Load and execute the given script in a new function scope. | |
| bool | LoadGlobalScript (const VfsPath &filename, const std::string &code) |
| Load and execute the given script in the global scope. | |
| bool | LoadGlobalScriptFile (const VfsPath &path) |
| Load and execute the given script in the global scope. | |
| jsval | CloneValueFromOtherContext (ScriptInterface &otherContext, jsval val) |
| Construct a new value (usable in this ScriptInterface's context) by cloning a value from a different context. | |
| AutoGCRooter * | ReplaceAutoGCRooter (AutoGCRooter *rooter) |
| void | DumpHeap () |
| Dump some memory heap debugging information to stderr. | |
| void | MaybeGC () |
| MaybeGC tries to determine whether garbage collection in cx's runtime would free up enough memory to be worth the amount of time it would take. | |
| shared_ptr< StructuredClone > | WriteStructuredClone (jsval v) |
| jsval | ReadStructuredClone (const shared_ptr< StructuredClone > &ptr) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, SDL_Event_ const &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, IGUIObject *const &val) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, bool &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, float &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, double &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, i32 &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, u32 &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, u16 &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, u8 &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, CScriptVal &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, CScriptValRooted &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, Path &out) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, Entity &out) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const bool &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const float &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const double &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const i32 &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const u16 &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const u8 &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const u32 &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const CScriptVal &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const CScriptValRooted &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const Path &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const wchar_t *const &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const char *const &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const CStrW &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const CStr8 &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, IComponent *const &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, CParamNode const &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const CParamNode *const &val) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, CColor &out) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, CColor const &val) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, fixed &out) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const fixed &val) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, CFixedVector3D &out) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const CFixedVector3D &val) |
| template<> | |
| bool | FromJSVal (JSContext *cx, jsval v, CFixedVector2D &out) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const CFixedVector2D &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const Grid< u8 > &val) |
| template<> | |
| jsval | ToJSVal (JSContext *cx, const Grid< u16 > &val) |
Static Public Member Functions | |
| static shared_ptr< ScriptRuntime > | CreateRuntime (int runtimeSize=DEFAULT_RUNTIME_SIZE) |
| Returns a runtime, which can used to initialise any number of ScriptInterfaces contexts. | |
| static void | ShutDown () |
| Shut down the JS system to clean up memory. | |
| static void * | GetCallbackData (JSContext *cx) |
| template<typename T > | |
| static bool | FromJSVal (JSContext *cx, jsval val, T &ret) |
| Convert a jsval to a C++ type. | |
| template<typename T > | |
| static jsval | ToJSVal (JSContext *cx, T const &val) |
| Convert a C++ type to a jsval. | |
Private Member Functions | |
| bool | CallFunction_ (jsval val, const char *name, size_t argc, jsval *argv, jsval &ret) |
| bool | Eval_ (const char *code, jsval &ret) |
| bool | Eval_ (const wchar_t *code, jsval &ret) |
| bool | SetGlobal_ (const char *name, jsval value, bool replace) |
| bool | SetProperty_ (jsval obj, const char *name, jsval value, bool readonly, bool enumerate) |
| bool | SetPropertyInt_ (jsval obj, int name, jsval value, bool readonly, bool enumerate) |
| bool | GetProperty_ (jsval obj, const char *name, jsval &value) |
| bool | GetPropertyInt_ (jsval obj, int name, jsval &value) |
| void | Register (const char *name, JSNative fptr, size_t nargs) |
Static Private Member Functions | |
| static bool | IsExceptionPending (JSContext *cx) |
| static JSClass * | GetClass (JSContext *cx, JSObject *obj) |
| static void * | GetPrivate (JSContext *cx, JSObject *obj) |
Private Attributes | |
| std::auto_ptr < ScriptInterface_impl > | m |
Abstraction around a SpiderMonkey JSContext.
Thread-safety:
| ScriptInterface::ScriptInterface | ( | const char * | nativeScopeName, | |
| const char * | debugName, | |||
| const shared_ptr< ScriptRuntime > & | runtime | |||
| ) |
Constructor.
| nativeScopeName | Name of global object that functions (via RegisterFunction) will be placed into, as a scoping mechanism; typically "Engine" | |
| debugName | Name of this interface for CScriptStats purposes. | |
| runtime | ScriptRuntime to use when initializing this interface. |
| ScriptInterface::~ScriptInterface | ( | ) |
| jsval ScriptInterface::CallConstructor | ( | jsval | ctor, | |
| jsval | arg | |||
| ) |
Call a constructor function, equivalent to JS "new ctor(arg)".
| bool ScriptInterface::CallFunction | ( | jsval | val, | |
| const char * | name, | |||
| const T0 & | a0, | |||
| const T1 & | a1, | |||
| const T2 & | a2, | |||
| const T3 & | a3, | |||
| R & | ret | |||
| ) | [inline] |
Call the named property on the given object, with return type R and 4 arguments.
| bool ScriptInterface::CallFunction | ( | jsval | val, | |
| const char * | name, | |||
| const T0 & | a0, | |||
| const T1 & | a1, | |||
| const T2 & | a2, | |||
| R & | ret | |||
| ) | [inline] |
Call the named property on the given object, with return type R and 3 arguments.
| bool ScriptInterface::CallFunction | ( | jsval | val, | |
| const char * | name, | |||
| const T0 & | a0, | |||
| const T1 & | a1, | |||
| R & | ret | |||
| ) | [inline] |
Call the named property on the given object, with return type R and 2 arguments.
| bool ScriptInterface::CallFunction | ( | jsval | val, | |
| const char * | name, | |||
| const T0 & | a0, | |||
| R & | ret | |||
| ) | [inline] |
Call the named property on the given object, with return type R and 1 argument.
| bool ScriptInterface::CallFunction | ( | jsval | val, | |
| const char * | name, | |||
| R & | ret | |||
| ) | [inline] |
Call the named property on the given object, with return type R and 0 arguments.
| bool ScriptInterface::CallFunction_ | ( | jsval | val, | |
| const char * | name, | |||
| size_t | argc, | |||
| jsval * | argv, | |||
| jsval & | ret | |||
| ) | [private] |
| bool ScriptInterface::CallFunctionVoid | ( | jsval | val, | |
| const char * | name, | |||
| const T0 & | a0, | |||
| const T1 & | a1, | |||
| const T2 & | a2 | |||
| ) | [inline] |
Call the named property on the given object, with void return type and 3 arguments.
| bool ScriptInterface::CallFunctionVoid | ( | jsval | val, | |
| const char * | name, | |||
| const T0 & | a0, | |||
| const T1 & | a1 | |||
| ) | [inline] |
Call the named property on the given object, with void return type and 2 arguments.
| bool ScriptInterface::CallFunctionVoid | ( | jsval | val, | |
| const char * | name, | |||
| const T0 & | a0 | |||
| ) | [inline] |
Call the named property on the given object, with void return type and 1 argument.
| bool ScriptInterface::CallFunctionVoid | ( | jsval | val, | |
| const char * | name | |||
| ) |
Call the named property on the given object, with void return type and 0 arguments.
| jsval ScriptInterface::CloneValueFromOtherContext | ( | ScriptInterface & | otherContext, | |
| jsval | val | |||
| ) |
Construct a new value (usable in this ScriptInterface's context) by cloning a value from a different context.
Complex values (functions, XML, etc) won't be cloned correctly, but basic types and cyclic references should be fine.
| shared_ptr< ScriptRuntime > ScriptInterface::CreateRuntime | ( | int | runtimeSize = DEFAULT_RUNTIME_SIZE |
) | [static] |
Returns a runtime, which can used to initialise any number of ScriptInterfaces contexts.
Values created in one context may be used in any other context from the same runtime (but not any other runtime). Each runtime should only ever be used on a single thread.
| runtimeSize | Maximum size in bytes of the new runtime |
| void ScriptInterface::DumpHeap | ( | ) |
Dump some memory heap debugging information to stderr.
| bool ScriptInterface::EnumeratePropertyNamesWithPrefix | ( | jsval | obj, | |
| const char * | prefix, | |||
| std::vector< std::string > & | out | |||
| ) |
| bool ScriptInterface::Eval | ( | const CHAR * | code, | |
| T & | out | |||
| ) | [inline] |
| bool ScriptInterface::Eval | ( | const char * | code | ) |
| bool ScriptInterface::Eval_ | ( | const wchar_t * | code, | |
| jsval & | ret | |||
| ) | [private] |
| bool ScriptInterface::Eval_ | ( | const char * | code, | |
| jsval & | ret | |||
| ) | [private] |
| bool ScriptInterface::FreezeObject | ( | jsval | obj, | |
| bool | deep | |||
| ) |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| CFixedVector2D & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| CFixedVector3D & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| fixed & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| CColor & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| Entity & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| Path & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| CScriptValRooted & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| CScriptVal & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| u8 & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| u16 & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| u32 & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| i32 & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| double & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| float & | out | |||
| ) | [inline] |
| bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | v, | |||
| bool & | out | |||
| ) | [inline] |
| static bool ScriptInterface::FromJSVal | ( | JSContext * | cx, | |
| jsval | val, | |||
| T & | ret | |||
| ) | [inline, static] |
Convert a jsval to a C++ type.
(This might trigger GC.)
| void * ScriptInterface::GetCallbackData | ( | JSContext * | cx | ) | [static] |
| JSClass * ScriptInterface::GetClass | ( | JSContext * | cx, | |
| JSObject * | obj | |||
| ) | [static, private] |
| JSContext * ScriptInterface::GetContext | ( | ) | const |
| JSClass * ScriptInterface::GetGlobalClass | ( | ) |
| jsval ScriptInterface::GetGlobalObject | ( | ) |
| void * ScriptInterface::GetPrivate | ( | JSContext * | cx, | |
| JSObject * | obj | |||
| ) | [static, private] |
| bool ScriptInterface::GetProperty | ( | jsval | obj, | |
| const char * | name, | |||
| T & | out | |||
| ) | [inline] |
Get the named property on the given object.
| bool ScriptInterface::GetProperty_ | ( | jsval | obj, | |
| const char * | name, | |||
| jsval & | value | |||
| ) | [private] |
| bool ScriptInterface::GetPropertyInt | ( | jsval | obj, | |
| int | name, | |||
| T & | out | |||
| ) | [inline] |
Get the integer-named property on the given object.
| bool ScriptInterface::GetPropertyInt_ | ( | jsval | obj, | |
| int | name, | |||
| jsval & | value | |||
| ) | [private] |
| JSRuntime * ScriptInterface::GetRuntime | ( | ) | const |
| bool ScriptInterface::HasProperty | ( | jsval | obj, | |
| const char * | name | |||
| ) |
Check the named property has been defined on the given object.
| bool ScriptInterface::IsExceptionPending | ( | JSContext * | cx | ) | [static, private] |
| bool ScriptInterface::LoadGlobalScript | ( | const VfsPath & | filename, | |
| const std::string & | code | |||
| ) |
Load and execute the given script in the global scope.
| filename | Name for debugging purposes (not used to load the file) | |
| code | JS code to execute |
| bool ScriptInterface::LoadGlobalScriptFile | ( | const VfsPath & | path | ) |
Load and execute the given script in the global scope.
| bool ScriptInterface::LoadScript | ( | const VfsPath & | filename, | |
| const std::string & | code | |||
| ) |
Load and execute the given script in a new function scope.
| filename | Name for debugging purposes (not used to load the file) | |
| code | JS code to execute |
| void ScriptInterface::MaybeGC | ( | ) |
MaybeGC tries to determine whether garbage collection in cx's runtime would free up enough memory to be worth the amount of time it would take.
| jsval ScriptInterface::NewObjectFromConstructor | ( | jsval | ctor | ) |
Create an object as with CallConstructor except don't actually execute the constructor function.
| CScriptValRooted ScriptInterface::ParseJSON | ( | const std::string & | string_utf8 | ) |
Parse a UTF-8-encoded JSON string.
Returns the undefined value on error.
| CScriptValRooted ScriptInterface::ReadJSONFile | ( | const VfsPath & | path | ) |
Read a JSON file.
Returns the undefined value on error.
| jsval ScriptInterface::ReadStructuredClone | ( | const shared_ptr< StructuredClone > & | ptr | ) |
| void ScriptInterface::Register | ( | const char * | name, | |
| JSNative | fptr, | |||
| size_t | nargs | |||
| ) | [private] |
| AutoGCRooter * ScriptInterface::ReplaceAutoGCRooter | ( | AutoGCRooter * | rooter | ) |
| void ScriptInterface::ReplaceNondeterministicFunctions | ( | boost::rand48 & | rng | ) |
| void ScriptInterface::ReportError | ( | const char * | msg | ) |
Report the given error message through the JS error reporting mechanism, and throw a JS exception.
(Callers can check IsPendingException, and must return JS_FALSE in that case to propagate the exception.)
| void ScriptInterface::SetCallbackData | ( | void * | cbdata | ) |
| bool ScriptInterface::SetGlobal | ( | const char * | name, | |
| const T & | value, | |||
| bool | replace = false | |||
| ) | [inline] |
Set the named property on the global object.
If replace is true, an existing property will be overwritten; otherwise attempts to set an already-defined value will fail.
| bool ScriptInterface::SetGlobal_ | ( | const char * | name, | |
| jsval | value, | |||
| bool | replace | |||
| ) | [private] |
| bool ScriptInterface::SetProperty | ( | jsval | obj, | |
| const char * | name, | |||
| const T & | value, | |||
| bool | constant = false, |
|||
| bool | enumerate = true | |||
| ) | [inline] |
Set the named property on the given object.
Optionally makes it {ReadOnly, DontDelete, DontEnum}.
| bool ScriptInterface::SetProperty_ | ( | jsval | obj, | |
| const char * | name, | |||
| jsval | value, | |||
| bool | readonly, | |||
| bool | enumerate | |||
| ) | [private] |
| bool ScriptInterface::SetPropertyInt | ( | jsval | obj, | |
| int | name, | |||
| const T & | value, | |||
| bool | constant = false, |
|||
| bool | enumerate = true | |||
| ) | [inline] |
Set the integer-named property on the given object.
Optionally makes it {ReadOnly, DontDelete, DontEnum}.
| bool ScriptInterface::SetPropertyInt_ | ( | jsval | obj, | |
| int | name, | |||
| jsval | value, | |||
| bool | readonly, | |||
| bool | enumerate | |||
| ) | [private] |
| bool ScriptInterface::SetPrototype | ( | jsval | obj, | |
| jsval | proto | |||
| ) |
| void ScriptInterface::ShutDown | ( | ) | [static] |
Shut down the JS system to clean up memory.
Must only be called when there are no ScriptInterfaces alive.
| std::string ScriptInterface::StringifyJSON | ( | jsval | obj, | |
| bool | indent = true | |||
| ) |
Stringify to a JSON string, UTF-8 encoded.
Returns an empty string on error.
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const Grid< u16 > & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const Grid< u8 > & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const CFixedVector2D & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const CFixedVector3D & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const fixed & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| CColor const & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const CParamNode *const & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| CParamNode const & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| IComponent *const & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const CStr8 & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const CStrW & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const char *const & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const wchar_t *const & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const Path & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const CScriptValRooted & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const CScriptVal & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const u32 & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const u8 & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const u16 & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const i32 & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const double & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const float & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| const bool & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| IGUIObject *const & | val | |||
| ) | [inline] |
| jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| SDL_Event_ const & | val | |||
| ) | [inline] |
| static jsval ScriptInterface::ToJSVal | ( | JSContext * | cx, | |
| T const & | val | |||
| ) | [inline, static] |
Convert a C++ type to a jsval.
(This might trigger GC. The return value must be rooted if you don't want it to be collected.)
| std::wstring ScriptInterface::ToString | ( | jsval | obj, | |
| bool | pretty = false | |||
| ) |
| shared_ptr< ScriptInterface::StructuredClone > ScriptInterface::WriteStructuredClone | ( | jsval | v | ) |
std::auto_ptr<ScriptInterface_impl> ScriptInterface::m [private] |
1.6.3