Pyrogenesis
trunk
|
#include "precompiled.h"
#include "ScriptConversions.h"
#include "graphics/Entity.h"
#include "maths/Vector2D.h"
#include "ps/utf16string.h"
#include "ps/CStr.h"
Macros | |
#define | FAIL(msg) STMT(JS_ReportError(cx, msg); return false) |
#define | WARN_IF_NOT(c, v) STMT(if (!(c)) { JS_ReportWarning(cx, "Script value conversion check failed: %s (got type %s)", #c, InformalValueTypeName(v)); }) |
Functions | |
static const char * | InformalValueTypeName (const JS::Value &v) |
template<> | |
bool | ScriptInterface::FromJSVal< std::wstring > (JSContext *cx, JS::HandleValue v, std::wstring &out) |
template<> | |
bool | ScriptInterface::FromJSVal< std::string > (JSContext *cx, JS::HandleValue v, std::string &out) |
template<> | |
void | ScriptInterface::ToJSVal< std::wstring > (JSContext *cx, JS::MutableHandleValue ret, const std::wstring &val) |
template<> | |
void | ScriptInterface::ToJSVal< std::string > (JSContext *cx, JS::MutableHandleValue ret, const std::string &val) |
template<> | |
void | ScriptInterface::ToJSVal< std::vector< IComponent * > > (JSContext *cx, JS::MutableHandleValue ret, const std::vector< IComponent * > &val) |
template<> | |
bool | ScriptInterface::FromJSVal< std::vector< Entity > > (JSContext *cx, JS::HandleValue v, std::vector< Entity > &out) |
#define FAIL | ( | msg | ) | STMT(JS_ReportError(cx, msg); return false) |
#define WARN_IF_NOT | ( | c, | |
v | |||
) | STMT(if (!(c)) { JS_ReportWarning(cx, "Script value conversion check failed: %s (got type %s)", #c, InformalValueTypeName(v)); }) |
|
static |
bool ScriptInterface::FromJSVal< std::string > | ( | JSContext * | cx, |
JS::HandleValue | v, | ||
std::string & | out | ||
) |
bool ScriptInterface::FromJSVal< std::vector< Entity > > | ( | JSContext * | cx, |
JS::HandleValue | v, | ||
std::vector< Entity > & | out | ||
) |
bool ScriptInterface::FromJSVal< std::wstring > | ( | JSContext * | cx, |
JS::HandleValue | v, | ||
std::wstring & | out | ||
) |
void ScriptInterface::ToJSVal< std::string > | ( | JSContext * | cx, |
JS::MutableHandleValue | ret, | ||
const std::string & | val | ||
) |
void ScriptInterface::ToJSVal< std::vector< IComponent * > > | ( | JSContext * | cx, |
JS::MutableHandleValue | ret, | ||
const std::vector< IComponent * > & | val | ||
) |
void ScriptInterface::ToJSVal< std::wstring > | ( | JSContext * | cx, |
JS::MutableHandleValue | ret, | ||
const std::wstring & | val | ||
) |