Go to the source code of this file.
|
static BOOL | JSExhaustPlumeGetExhaustPlumeEntity (JSContext *context, JSObject *jsobj, OOExhaustPlumeEntity **outEntity) |
|
static JSBool | ExhaustPlumeGetProperty (JSContext *context, JSObject *this, jsid propID, jsval *value) |
|
static JSBool | ExhaustPlumeSetProperty (JSContext *context, JSObject *this, jsid propID, JSBool strict, jsval *value) |
|
static JSBool | ExhaustPlumeRemove (JSContext *context, uintN argc, jsval *vp) |
|
void | InitOOJSExhaustPlume (JSContext *context, JSObject *global) |
|
◆ GET_THIS_EXHAUSTPLUME
#define GET_THIS_EXHAUSTPLUME |
( |
| THISENT | ) |
|
Value: do { \
} while (0)
OOINLINE BOOL OOIsStaleEntity(Entity *entity)
static BOOL JSExhaustPlumeGetExhaustPlumeEntity(JSContext *context, JSObject *jsobj, OOExhaustPlumeEntity **outEntity)
Definition at line 202 of file OOJSExhaustPlume.m.
202#define GET_THIS_EXHAUSTPLUME(THISENT) do { \
203 if (EXPECT_NOT(!JSExhaustPlumeGetExhaustPlumeEntity(context, OOJS_THIS, &THISENT))) return NO; \
204 if (OOIsStaleEntity(THISENT)) OOJS_RETURN_VOID; \
205} while (0)
Referenced by OOExhaustPlumeEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:.
◆ anonymous enum
◆ ExhaustPlumeGetProperty()
static JSBool ExhaustPlumeGetProperty |
( |
JSContext * | context, |
|
|
JSObject * | this, |
|
|
jsid | propID, |
|
|
jsval * | value ) |
|
static |
Definition at line 137 of file OOJSExhaustPlume.m.
138{
139 if (!JSID_IS_INT(propID)) return YES;
140
142
145
147 if (entity ==
nil) { *value = JSVAL_VOID;
return YES; }
148
149 switch (JSID_TO_INT(propID))
150 {
153
154 default:
156 return NO;
157 }
158
160 return YES;
161
163}
#define OOJS_NATIVE_ENTER(cx)
static JSPropertySpec sExhaustPlumeProperties[]
BOOL VectorToJSValue(JSContext *context, Vector vector, jsval *outValue) NONNULL_FUNC
OOINLINE jsval OOJSValueFromNativeObject(JSContext *context, id object)
void OOJSReportBadPropertySelector(JSContext *context, JSObject *thisObj, jsid propID, JSPropertySpec *propertySpec)
References JSExhaustPlumeGetExhaustPlumeEntity(), kExhaustPlume_size, nil, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportBadPropertySelector(), OOJSValueFromNativeObject(), sExhaustPlumeProperties, and VectorToJSValue().
◆ ExhaustPlumeRemove()
static JSBool ExhaustPlumeRemove |
( |
JSContext * | context, |
|
|
uintN | argc, |
|
|
jsval * | vp ) |
|
static |
Definition at line 208 of file OOJSExhaustPlume.m.
209{
211
214
217
219
221}
#define GET_THIS_EXHAUSTPLUME(THISENT)
void removeExhaust:(OOExhaustPlumeEntity *exhaust)
◆ ExhaustPlumeSetProperty()
static JSBool ExhaustPlumeSetProperty |
( |
JSContext * | context, |
|
|
JSObject * | this, |
|
|
jsid | propID, |
|
|
JSBool | strict, |
|
|
jsval * | value ) |
|
static |
Definition at line 166 of file OOJSExhaustPlume.m.
167{
168 if (!JSID_IS_INT(propID)) return YES;
169
171
173 Vector vValue;
174
176 if (entity ==
nil)
return YES;
177
178 switch (JSID_TO_INT(propID))
179 {
182 {
184 return YES;
185 }
186 break;
187
188 default:
190 return NO;
191 }
192
194 return NO;
195
197}
BOOL JSValueToVector(JSContext *context, jsval value, Vector *outVector) NONNULL_FUNC
void OOJSReportBadPropertyValue(JSContext *context, JSObject *thisObj, jsid propID, JSPropertySpec *propertySpec, jsval value)
void setScale:(Vector scale)
References JSExhaustPlumeGetExhaustPlumeEntity(), JSValueToVector(), kExhaustPlume_size, nil, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportBadPropertySelector(), OOJSReportBadPropertyValue(), OOExhaustPlumeEntity::setScale:, and sExhaustPlumeProperties.
◆ InitOOJSExhaustPlume()
void InitOOJSExhaustPlume |
( |
JSContext * | context, |
|
|
JSObject * | global ) |
Definition at line 85 of file OOJSExhaustPlume.m.
86{
90}
OOINLINE JSClass * JSEntityClass(void)
OOINLINE JSObject * JSEntityPrototype(void)
static JSClass sExhaustPlumeClass
static JSObject * sExhaustPlumePrototype
static JSFunctionSpec sExhaustPlumeMethods[]
void OOJSRegisterObjectConverter(JSClass *theClass, OOJSClassConverterCallback converter)
JSBool OOJSUnconstructableConstruct(JSContext *context, uintN argc, jsval *vp)
void OOJSRegisterSubclass(JSClass *subclass, JSClass *superclass)
id OOJSBasicPrivateObjectConverter(JSContext *context, JSObject *object)
References JSEntityClass(), JSEntityPrototype(), OOJSBasicPrivateObjectConverter(), OOJSRegisterObjectConverter(), OOJSRegisterSubclass(), OOJSUnconstructableConstruct(), sExhaustPlumeClass, sExhaustPlumeMethods, sExhaustPlumeProperties, and sExhaustPlumePrototype.
◆ JSExhaustPlumeGetExhaustPlumeEntity()
static BOOL JSExhaustPlumeGetExhaustPlumeEntity |
( |
JSContext * | context, |
|
|
JSObject * | jsobj, |
|
|
OOExhaustPlumeEntity ** | outEntity ) |
|
static |
◆ sExhaustPlumeClass
JSClass sExhaustPlumeClass |
|
static |
Initial value:=
{
"ExhaustPlume",
JSCLASS_HAS_PRIVATE,
JS_PropertyStub,
JS_PropertyStub,
JS_EnumerateStub,
JS_ResolveStub,
JS_ConvertStub,
JSCLASS_NO_OPTIONAL_MEMBERS
}
static JSBool ExhaustPlumeGetProperty(JSContext *context, JSObject *this, jsid propID, jsval *value)
static JSBool ExhaustPlumeSetProperty(JSContext *context, JSObject *this, jsid propID, JSBool strict, jsval *value)
void OOJSObjectWrapperFinalize(JSContext *context, JSObject *this)
Definition at line 44 of file OOJSExhaustPlume.m.
45{
46 "ExhaustPlume",
47 JSCLASS_HAS_PRIVATE,
48
49 JS_PropertyStub,
50 JS_PropertyStub,
53 JS_EnumerateStub,
54 JS_ResolveStub,
55 JS_ConvertStub,
57 JSCLASS_NO_OPTIONAL_MEMBERS
58};
Referenced by InitOOJSExhaustPlume().
◆ sExhaustPlumeMethods
JSFunctionSpec sExhaustPlumeMethods[] |
|
static |
◆ sExhaustPlumeProperties
JSPropertySpec sExhaustPlumeProperties[] |
|
static |
◆ sExhaustPlumePrototype
JSObject* sExhaustPlumePrototype |
|
static |