H3D API  2.4.1
Static Public Member Functions | Static Public Attributes | List of all members
H3D::SpiderMonkey::JS_MField< MFieldType, ElementType > Struct Template Reference

MField template. More...

#include <H3D/SpiderMonkeyTypes.h>

Static Public Member Functions

static JSObject * newInstance (JSContext *cx, Field *field, bool internal_field, int array_index=-1)
 Returns a new JSObject object encapsulating a field. More...
 
static JSBool setProperty (JSContext *cx, JSObject *obj, jsval id, jsval *vp)
 Callback setter function for properties of a JS_MField object.
 
static JSBool getProperty (JSContext *cx, JSObject *obj, jsval id, jsval *vp)
 Callback getter function for properties of a JS_MField object.
 
static JSBool construct (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 Construct callback function for creating a new instance of JS_MField. More...
 

Static Public Attributes

static JSFunctionSpec functions [2]
 Member functions.
 

Detailed Description

template<class MFieldType, class ElementType>
struct H3D::SpiderMonkey::JS_MField< MFieldType, ElementType >

MField template.

Member Function Documentation

◆ construct()

template<class MFieldType , class ElementType >
JSBool SpiderMonkey::JS_MField::construct ( JSContext *  cx,
JSObject *  obj,
uintN  argc,
jsval *  argv,
jsval *  rval 
)
static

Construct callback function for creating a new instance of JS_MField.

Construct callback function for creating a new instance of SFNode.

References H3D::SpiderMonkey::setFieldValueFromjsval().

◆ newInstance()

template<class MFieldType , class ElementType >
JSObject * H3D::SpiderMonkey::JS_MField< MFieldType, ElementType >::newInstance ( JSContext *  cx,
Field field,
bool  internal_field,
int  array_index = -1 
)
static

Returns a new JSObject object encapsulating a field.

Parameters
cxThe context in which to create the object.
fieldThe field to encapsulate.
internal_fieldIf true, the encapsulated field will be deleted upon destruction of the JSObject encapsulating it.
array_indexIndex into MF type.

The documentation for this struct was generated from the following files: