30 #ifndef __SPIDERMONKEYSAI_H__
31 #define __SPIDERMONKEYSAI_H__
38 #ifdef HAVE_SPIDERMONKEY
66 string loadScript(
const string &s,
const string &filename );
97 virtual void update();
Contains the Field class.
Header file for PeriodicUpdate, template field modifier.
This file contains functions for convertion from a string to a value of an X3D field type.
Header file containing useful functions for conversions of different representations of X3D types.
Header file containing all X3D types enumerated.
The Field class.
Definition: Field.h:46
The PeriodicUpdate is a template modifier that changes the way the field is updated.
Definition: PeriodicUpdate.h:74
No scripting is supported with the Script node yet.
Definition: Script.h:43
The CallbackFunctionDispatcher class handles the calls of the ecmascript callback functions for the f...
Definition: SpiderMonkeySAI.h:96
The SpiderMonkeySAI class is an implementation of the X3D Ecmascript SAI specification using SpiderMo...
Definition: SpiderMonkeySAI.h:52
bool initializeScriptEngine(Script *s)
Initialize the script engine for the given script, adding all types, attributes, functions etc .
Definition: SpiderMonkeySAI.cpp:73
string loadScript(const string &s, const string &filename)
Run the script specified by s.
Definition: SpiderMonkeySAI.cpp:151
JSObject * global
The global object including all global properties and functions.
Definition: SpiderMonkeySAI.h:88
JSContext * cx
The script engine context used.
Definition: SpiderMonkeySAI.h:84
void uninitializeScriptEngine()
Release all resources allocated for the script engine.
Definition: SpiderMonkeySAI.cpp:216
JSRuntime * rt
The script engine runtime used.
Definition: SpiderMonkeySAI.h:81
H3DUniquePtr< CallbackFunctionDispatcher > callbackFunctionDispatcher
Field that handles calling of callback functions as events are received.
Definition: SpiderMonkeySAI.h:110
string fieldNameToCallbackName(const string &n)
Given a field name it returns the name used for the callback function in the global namespace.
Definition: SpiderMonkeySAI.cpp:212
bool isInitialized()
Returns true if the script engine has been initialized.
Definition: SpiderMonkeySAI.h:72
virtual bool addField(Field *field)
Add an interface to a field to the script engine.
Definition: SpiderMonkeySAI.cpp:223
SpiderMonkeySAI()
Constructor.
Definition: SpiderMonkeySAI.cpp:42
Script * script_node
The Script node this script engine is used for,.
Definition: SpiderMonkeySAI.h:91
H3D API namespace.
Definition: Anchor.h:38