Pyrogenesis  trunk
Classes | Macros | Functions | Variables
ScriptInterface.h File Reference
#include <boost/random/linear_congruential.hpp>
#include "lib/file/vfs/vfs_path.h"
#include "maths/Fixed.h"
#include "ScriptTypes.h"
#include "ps/Errors.h"
#include "NativeWrapperDecls.h"
#include "NativeWrapperDefns.h"
Include dependency graph for ScriptInterface.h:

Go to the source code of this file.

Classes

class  ScriptInterface
 Abstraction around a SpiderMonkey JSContext. More...
 
struct  ScriptInterface::CxPrivate
 
class  ScriptInterface::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...
 
struct  ScriptInterface::CustomType
 
struct  ScriptInterface::MaybeRef< T >
 

Macros

#define SCRIPT_INTERFACE_MAX_ARGS   8
 
#define DEFAULT_RUNTIME_SIZE   16 * 1024 * 1024
 
#define DEFAULT_HEAP_GROWTH_BYTES_GCTRIGGER   2 * 1024 *1024
 

Functions

 ERROR_GROUP (Scripting)
 
 ERROR_TYPE (Scripting, SetupFailed)
 
 ERROR_SUBGROUP (Scripting, LoadFile)
 
 ERROR_TYPE (Scripting_LoadFile, OpenFailed)
 
 ERROR_TYPE (Scripting_LoadFile, EvalErrors)
 
 ERROR_TYPE (Scripting, ConversionFailed)
 
 ERROR_TYPE (Scripting, CallFunctionFailed)
 
 ERROR_TYPE (Scripting, RegisterFunctionFailed)
 
 ERROR_TYPE (Scripting, DefineConstantFailed)
 
 ERROR_TYPE (Scripting, CreateObjectFailed)
 
 ERROR_TYPE (Scripting, TypeDoesNotExist)
 
 ERROR_SUBGROUP (Scripting, DefineType)
 
 ERROR_TYPE (Scripting_DefineType, AlreadyExists)
 
 ERROR_TYPE (Scripting_DefineType, CreationFailed)
 
template<>
void ScriptInterface::AssignOrToJSVal< JS::PersistentRootedValue > (JSContext *cx, JS::MutableHandleValue handle, const JS::PersistentRootedValue &a)
 
template<>
void ScriptInterface::AssignOrToJSVal< JS::RootedValue > (JSContext *cx, JS::MutableHandleValue handle, const JS::RootedValue &a)
 
template<>
void ScriptInterface::AssignOrToJSVal< JS::HandleValue > (JSContext *cx, JS::MutableHandleValue handle, const JS::HandleValue &a)
 
template<>
void ScriptInterface::AssignOrToJSValUnrooted< JS::Value > (JSContext *cx, JS::MutableHandleValue handle, const JS::Value &a)
 
template<>
JS::HandleValue ScriptInterface::AssignOrFromJSVal< JS::HandleValue > (JSContext *cx, const JS::HandleValue &val, bool &ret)
 

Variables

shared_ptr< ScriptRuntimeg_ScriptRuntime
 

Macro Definition Documentation

#define DEFAULT_HEAP_GROWTH_BYTES_GCTRIGGER   2 * 1024 *1024
#define DEFAULT_RUNTIME_SIZE   16 * 1024 * 1024
#define SCRIPT_INTERFACE_MAX_ARGS   8

Function Documentation

ERROR_GROUP ( Scripting  )
ERROR_SUBGROUP ( Scripting  ,
LoadFile   
)
ERROR_SUBGROUP ( Scripting  ,
DefineType   
)
ERROR_TYPE ( Scripting  ,
SetupFailed   
)
ERROR_TYPE ( Scripting_LoadFile  ,
OpenFailed   
)
ERROR_TYPE ( Scripting_LoadFile  ,
EvalErrors   
)
ERROR_TYPE ( Scripting  ,
ConversionFailed   
)
ERROR_TYPE ( Scripting  ,
CallFunctionFailed   
)
ERROR_TYPE ( Scripting  ,
RegisterFunctionFailed   
)
ERROR_TYPE ( Scripting  ,
DefineConstantFailed   
)
ERROR_TYPE ( Scripting  ,
CreateObjectFailed   
)
ERROR_TYPE ( Scripting  ,
TypeDoesNotExist   
)
ERROR_TYPE ( Scripting_DefineType  ,
AlreadyExists   
)
ERROR_TYPE ( Scripting_DefineType  ,
CreationFailed   
)
template<>
JS::HandleValue ScriptInterface::AssignOrFromJSVal< JS::HandleValue > ( JSContext *  cx,
const JS::HandleValue &  val,
bool &  ret 
)
inline
template<>
void ScriptInterface::AssignOrToJSVal< JS::HandleValue > ( JSContext *  cx,
JS::MutableHandleValue  handle,
const JS::HandleValue &  a 
)
inline
template<>
void ScriptInterface::AssignOrToJSVal< JS::PersistentRootedValue > ( JSContext *  cx,
JS::MutableHandleValue  handle,
const JS::PersistentRootedValue &  a 
)
inline
template<>
void ScriptInterface::AssignOrToJSVal< JS::RootedValue > ( JSContext *  cx,
JS::MutableHandleValue  handle,
const JS::RootedValue &  a 
)
inline
template<>
void ScriptInterface::AssignOrToJSValUnrooted< JS::Value > ( JSContext *  cx,
JS::MutableHandleValue  handle,
const JS::Value &  a 
)
inline

Variable Documentation

shared_ptr<ScriptRuntime> g_ScriptRuntime