![]() |
Oolite 1.91.0.7658-250404-b1488af
|
#include <OOJSScript.h>
Instance Methods | |
(id) | - initWithPath:properties: |
(BOOL) | - callMethod:inContext:withArguments:count:result: |
(id) | - propertyWithID:inContext: |
(BOOL) | - setProperty:withID:inContext: |
(BOOL) | - defineProperty:withID:inContext: |
(id) | - propertyNamed: |
(BOOL) | - setProperty:named: |
(BOOL) | - defineProperty:named: |
(void) | - dealloc [implementation] |
(NSString *) | - oo_jsClassName [implementation] |
(NSString *) | - descriptionComponents [implementation] |
(void) | - javaScriptEngineWillReset: [implementation] |
(id) | - weakRetain [implementation] |
(void) | - weakRefDied: [implementation] |
(NSString *) | - scriptDescription [implementation] |
(void) | - runWithTarget: [implementation] |
(jsval) | - oo_jsValueInContext: [implementation] |
(NSString *) | - scriptNameFromPath: [implementation] |
(NSDictionary *) | - defaultPropertiesFromPath: [implementation] |
![]() | |
(NSString *) | - name |
(NSString *) | - version |
(NSString *) | - displayName |
(BOOL) | - requiresTickle |
![]() | |
(id) | - OO_RETURNS_RETAINED |
Class Methods | |
(id) | + scriptWithPath:properties: |
(OOJSScript *) | + currentlyRunningScript |
(NSArray *) | + scriptStack |
(void) | + pushScript: |
(void) | + popScript: |
![]() | |
(NSArray *) | + worldScriptsAtPath: |
(NSArray *) | + scriptsFromFileNamed: |
(NSArray *) | + scriptsFromList: |
(NSArray *) | + scriptsFromFileAtPath: |
(id) | + jsScriptFromFileNamed:properties: |
(id) | + jsAIScriptFromFileNamed:properties: |
Private Attributes | |
JSObject * | _jsSelf |
NSString * | name |
NSString * | description |
NSString * | version |
NSString * | filePath |
OOWeakReference * | weakSelf |
Definition at line 31 of file OOJSScript.h.
- (BOOL) callMethod: | (jsid) | methodID | |
inContext: | (JSContext *) | context | |
withArguments: | (jsval *) | argv | |
count: | (intN) | argc | |
result: | (jsval *) | outResult |
Reimplemented from OOScript.
Definition at line 395 of file OOJSScript.m.
References _jsSelf, RunningStack::back, EXPECT, JS_IsInRequest, name, OOJSAddGCObjectRoot, OOJSStartTimeLimiter, OOJSStopTimeLimiter, OOLog, OOLogIndentIf, OOLogOutdentIf, OOStringFromJSID(), and sRunningStack.
Referenced by StationEntity::acceptDockingClearanceRequestFrom:, PlayerEntity::activatePrimableEquipment:withMode:, PlayerEntity::adjustPriceByScriptForEqKey:withCurrent:, DockEntity::allowsLaunchingOf:, ShipEntity::behaviour_scripted_ai:, DockEntity::canAcceptShipForDocking:, Universe::canInstantiateShip:, StationEntity::dockingInstructionsForShip:, OOCharacter::doScriptEvent:, OOVisualEffectEntity::doScriptEvent:, ShipEntity::doScriptEvent:inContext:withArguments:count:, ShipEntity::equipmentValidToAdd:whileLoading:inContext:, OOShipRegistry(OODataLoader)::loadDemoShips, OODebugMonitor::performJSConsoleCommand:, and Universe::shipsForSaleForSystem:withTL:atTime:.
+ (OOJSScript *) currentlyRunningScript |
Definition at line 339 of file OOJSScript.m.
References currentlyRunningScript, and sRunningStack.
Referenced by currentlyRunningScript, OOJSGuiScreenKeyDefinition::init, OOJSInterfaceDefinition::init, OOJSPopulatorDefinition::init, OOJSTimer(Private)::initWithDelay:interval:context:function:this:, OODebugMonitor(Private)::jsEngine:context:error:stackSkip:showingLocation:withMessage:, MissionRunScreen(), MissionSetInstructionsInternal(), ReportJSError(), OOSystemInfo::setValue:forKey:, SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), and SystemSetProperty().
|
implementation |
Definition at line 286 of file OOJSScript.m.
References _jsSelf, dealloc, description, DESTROY, filePath, name, OOJSAcquireContext(), OOJSObjectWrapperFinalize(), OOJSRelinquishContext(), OOJavaScriptEngine::sharedEngine, version, and OOWeakReference::weakRefDrop.
Referenced by dealloc.
|
implementation |
Provided by category OOJSScript(OOPrivate).
Definition at line 616 of file OOJSScript.m.
Referenced by initWithPath:properties:.
- (BOOL) defineProperty: | (id) | value | |
named: | (NSString *) | name |
Definition at line 517 of file OOJSScript.m.
References _jsSelf, defineProperty:withID:inContext:, nil, OOJSAcquireContext(), and OOJSRelinquishContext().
Referenced by initWithPath:properties:.
- (BOOL) defineProperty: | (id) | value | |
withID: | (jsid) | propID | |
inContext: | (JSContext *) | context |
Definition at line 481 of file OOJSScript.m.
References _jsSelf, JS_IsInRequest, OOJS_PROP_READONLY, and OOJSValueFromNativeObject().
Referenced by defineProperty:named:.
|
implementation |
Reimplemented from OOScript.
Definition at line 319 of file OOJSScript.m.
References _jsSelf, descriptionComponents, and OOScript::descriptionComponents.
Referenced by descriptionComponents.
- (id) initWithPath: | (NSString *) | path | |
properties: | (NSDictionary *) | properties |
Definition at line 118 of file OOJSScript.m.
References _jsSelf, RunningStack::back, defaultPropertiesFromPath:, defineProperty:named:, description, DESTROY, OOScript::displayName, filePath, kLocalManifestProperty, kOOJSLongTimeLimit, LoadScriptWithName(), name, nil, OOConsumeReference(), OOJSAcquireContext(), OOJSAddGCObjectRoot, OOJSID, OOJSRelinquishContext(), OOJSStartTimeLimiterWithTimeLimit, OOJSStopTimeLimiter, OOLog, OOLogERR, OOLogIndentIf, OOLogOutdentIf, propertyWithID:inContext:, scriptNameFromPath:, setProperty:named:, setProperty:withID:inContext:, OOJavaScriptEngine::sharedEngine, sRunningStack, sScriptClass, sScriptPrototype, version, and weakRetain.
|
implementation |
Definition at line 326 of file OOJSScript.m.
References _jsSelf, OOJSAcquireContext(), and OOJSRelinquishContext().
|
implementation |
Definition at line 313 of file OOJSScript.m.
References oo_jsClassName.
Referenced by oo_jsClassName.
|
implementation |
Definition at line 530 of file OOJSScript.m.
References _jsSelf.
+ (void) popScript: | (OOJSScript *) | script |
Definition at line 550 of file OOJSScript.m.
References sRunningStack.
Referenced by OOJSFunction::evaluateWithContext:scope:argc:argv:result:, MissionRunCallback(), OOJSGuiScreenKeyDefinition::runCallback:, OOJSInterfaceDefinition::runCallback:, OOJSPopulatorDefinition::runCallback:, and OOJSTimer::timerFired.
- (id) propertyNamed: | (NSString *) | name |
Definition at line 491 of file OOJSScript.m.
References _jsSelf, nil, OOJSAcquireContext(), OOJSRelinquishContext(), and propertyWithID:inContext:.
Referenced by OOSystemInfo::setValue:forKey:, SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), and SystemSetProperty().
- (id) propertyWithID: | (jsid) | propID | |
inContext: | (JSContext *) | context |
Definition at line 457 of file OOJSScript.m.
References _jsSelf, JS_IsInRequest, nil, and OOJSNativeObjectFromJSValue().
Referenced by initWithPath:properties:, and propertyNamed:.
+ (void) pushScript: | (OOJSScript *) | script |
Definition at line 537 of file OOJSScript.m.
References RunningStack::back, RunningStack::current, and sRunningStack.
Referenced by OOJSFunction::evaluateWithContext:scope:argc:argv:result:, MissionRunCallback(), OOJSGuiScreenKeyDefinition::runCallback:, OOJSInterfaceDefinition::runCallback:, OOJSPopulatorDefinition::runCallback:, and OOJSTimer::timerFired.
|
implementation |
Reimplemented from OOScript.
Definition at line 389 of file OOJSScript.m.
|
implementation |
Reimplemented from OOScript.
Definition at line 377 of file OOJSScript.m.
References description, and scriptDescription.
Referenced by scriptDescription.
|
implementation |
Provided by category OOJSScript(OOPrivate).
Definition at line 582 of file OOJSScript.m.
Referenced by initWithPath:properties:.
+ (NSArray *) scriptStack |
Definition at line 346 of file OOJSScript.m.
References AddStackToArrayReversed(), nil, scriptStack, and sRunningStack.
Referenced by scriptStack.
+ (id) scriptWithPath: | (NSString *) | path | |
properties: | (NSDictionary *) | properties |
Definition at line 112 of file OOJSScript.m.
Referenced by OOScript::jsAIScriptFromFileNamed:properties:, OOScript::jsScriptFromFileNamed:properties:, OOCheckJSSyntaxVerifierStage::run, OOScript::scriptsFromFileAtPath:, OODebugMonitor(Private)::setUpDebugConsoleScript, and OOScript::worldScriptsAtPath:.
- (BOOL) setProperty: | (id) | value | |
named: | (NSString *) | name |
Definition at line 504 of file OOJSScript.m.
References _jsSelf, nil, OOJSAcquireContext(), OOJSRelinquishContext(), and setProperty:withID:inContext:.
Referenced by initWithPath:properties:.
- (BOOL) setProperty: | (id) | value | |
withID: | (jsid) | propID | |
inContext: | (JSContext *) | context |
Definition at line 471 of file OOJSScript.m.
References _jsSelf, JS_IsInRequest, and OOJSValueFromNativeObject().
Referenced by initWithPath:properties:, and setProperty:named:.
|
implementation |
Reimplemented from <OOWeakReferenceSupport>.
Definition at line 363 of file OOJSScript.m.
|
implementation |
Definition at line 356 of file OOJSScript.m.
References nil, OOWeakReference::weakRefWithObject:, weakRetain, and weakSelf.
Referenced by OOJSGuiScreenKeyDefinition::init, OOJSInterfaceDefinition::init, OOJSPopulatorDefinition::init, OOJSTimer(Private)::initWithDelay:interval:context:function:this:, initWithPath:properties:, OODebugMonitor(Private)::jsEngine:context:error:stackSkip:showingLocation:withMessage:, ReportJSError(), and weakRetain.
|
private |
Definition at line 35 of file OOJSScript.h.
Referenced by callMethod:inContext:withArguments:count:result:, dealloc, defineProperty:named:, defineProperty:withID:inContext:, descriptionComponents, initWithPath:properties:, javaScriptEngineWillReset:, oo_jsValueInContext:, propertyNamed:, propertyWithID:inContext:, setProperty:named:, and setProperty:withID:inContext:.
|
private |
Definition at line 38 of file OOJSScript.h.
Referenced by dealloc, initWithPath:properties:, and scriptDescription.
|
private |
Definition at line 40 of file OOJSScript.h.
Referenced by dealloc, and initWithPath:properties:.
|
private |
Definition at line 369 of file OOJSScript.m.
Referenced by callMethod:inContext:withArguments:count:result:, dealloc, initWithPath:properties:, MissionSetInstructionsInternal(), and OOShipDebugInspectorModule::update.
|
private |
Definition at line 383 of file OOJSScript.m.
Referenced by dealloc, and initWithPath:properties:.
|
private |
Definition at line 42 of file OOJSScript.h.
Referenced by weakRefDied:, and weakRetain.