Oolite
Loading...
Searching...
No Matches
OOJSPopulatorDefinition.h
Go to the documentation of this file.
1
/*
2
3
OOJSPopulatorDefinition.h (QuickJS-ng)
4
5
6
Oolite
7
Copyright (C) 2004-2013 Giles C Williams and contributors
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
MA 02110-1301, USA.
23
24
*/
25
26
#import "
OOJSScript.h
"
27
#import "
OOMaths.h
"
28
#include <quickjs.h>
29
30
/* The definition owns references to its callback and callbackThis, which are
31
released on dealloc and when the JavaScript engine is reset.
32
*/
33
@interface
OOJSPopulatorDefinition
:
OOWeakRefObject
{
34
@private
35
JSValue
_callback
;
// Owned.
36
JSValue
_callbackThis
;
// Owned.
37
OOJSScript
*
_owningScript
;
38
}
39
40
// Returned values are owned by the caller.
41
- (JSValue)
callback
;
42
- (void)setCallback:(JSValueConst)callback;
43
- (JSValue)
callbackThis
;
44
- (void)setCallbackThis:(JSValueConst)callbackthis;
45
46
- (void)runCallback:(
HPVector
)location;
47
48
@end
OOMaths.h
OOJSScript.h
OOJSPopulatorDefinition
Definition
OOJSPopulatorDefinition.h:30
OOJSPopulatorDefinition::_owningScript
OOJSScript * _owningScript
Definition
OOJSPopulatorDefinition.h:34
OOJSPopulatorDefinition::_callback
jsval _callback
Definition
OOJSPopulatorDefinition.h:32
OOJSPopulatorDefinition::_callbackThis
JSObject * _callbackThis
Definition
OOJSPopulatorDefinition.h:33
-[OOJSPopulatorDefinition callbackThis]
JSObject * callbackThis()
Definition
OOJSPopulatorDefinition.m:87
-[OOJSPopulatorDefinition callback]
jsval callback()
Definition
OOJSPopulatorDefinition.m:73
OOJSScript
Definition
OOJSScript.h:30
OOWeakRefObject
Definition
OOWeakReference.h:132
HPVector
Definition
OOHPVector.h:35
src
Core
Scripting
QuickJS
OOJSPopulatorDefinition.h
Generated by
1.15.0