Pyrogenesis  trunk
Macros | Functions
ScriptConversions.h File Reference
#include "ScriptInterface.h"
#include "scriptinterface/ScriptExtraHeaders.h"
#include <limits>
Include dependency graph for ScriptConversions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FAIL(msg)   STMT(JS_ReportError(cx, msg); return false)
 
#define JSVAL_VECTOR(T)
 

Functions

template<typename T >
static void ToJSVal_vector (JSContext *cx, JS::MutableHandleValue ret, const std::vector< T > &val)
 
template<typename T >
static bool FromJSVal_vector (JSContext *cx, JS::HandleValue v, std::vector< T > &out)
 
template<typename T >
static bool FromJSProperty (JSContext *cx, JS::HandleValue v, const char *name, T &out)
 

Macro Definition Documentation

#define FAIL (   msg)    STMT(JS_ReportError(cx, msg); return false)
#define JSVAL_VECTOR (   T)
Value:
template<> void ScriptInterface::ToJSVal<std::vector<T> >(JSContext* cx, JS::MutableHandleValue ret, const std::vector<T>& val) \
{ \
ToJSVal_vector(cx, ret, val); \
} \
template<> bool ScriptInterface::FromJSVal<std::vector<T> >(JSContext* cx, JS::HandleValue v, std::vector<T>& out) \
{ \
return FromJSVal_vector(cx, v, out); \
}
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:419
static bool FromJSVal_vector(JSContext *cx, JS::HandleValue v, std::vector< T > &out)
Definition: ScriptConversions.h:48
static void ToJSVal_vector(JSContext *cx, JS::MutableHandleValue ret, const std::vector< T > &val)
Definition: ScriptConversions.h:26

Function Documentation

template<typename T >
static bool FromJSProperty ( JSContext *  cx,
JS::HandleValue  v,
const char *  name,
T out 
)
static
template<typename T >
static bool FromJSVal_vector ( JSContext *  cx,
JS::HandleValue  v,
std::vector< T > &  out 
)
static
template<typename T >
static void ToJSVal_vector ( JSContext *  cx,
JS::MutableHandleValue  ret,
const std::vector< T > &  val 
)
static