|
Oolite
|
#include <OOJSScript.h>
Class Methods | |
| (id) | + scriptWithPath:properties: |
| (OOJSScript *) | + currentlyRunningScript |
| (NSArray *) | + scriptStack |
| (void) | + pushScript: |
| (void) | + popScript: |
| (id) | + scriptWithPath:properties: |
| (OOJSScript *) | + currentlyRunningScript |
| (NSArray *) | + scriptStack |
| (void) | + pushScript: |
| (void) | + popScript: |
| (id) | + scriptWithPath: |
| (OOJSScript *) | + currentlyRunningScript |
| Class Methods inherited from OOScript | |
| (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 |
| JSValue | _jsSelf |
| NSString * | _name |
| NSString * | _version |
| NSString * | _path |
Definition at line 30 of file OOJSScript.h.
| - (BOOL) callMethod: | (JSAtom) | methodID | |
| inContext: | (JSContext*) | context | |
| withArguments: | (JSValueConst*) | argv | |
| count: | (int) | argc | |
| result: | (JSValue*) | outResult |
Reimplemented from OOScript.
Definition at line 328 of file OOJSScript.m.
| - (BOOL) callMethod: | (jsid) | methodID | |
| inContext: | (JSContext*) | context | |
| withArguments: | (jsval*) | argv | |
| count: | (intN) | argc | |
| result: | (jsval*) | outResult |
Reimplemented from OOScript.
Definition at line 328 of file OOJSScript.m.
References _jsSelf, RunningStack::back, EXPECT, EXPECT_NOT, name, OOJSReportPendingException(), 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, and Universe::shipsForSaleForSystem:withTL:atTime:.
| - (BOOL) callMethodNamed: | (NSString*) | methodName | |
| withArguments: | (JSValueConst*) | argv | |
| count: | (int) | argc | |
| result: | (JSValue*) | outResult |
Definition at line 130 of file OOJSScript.m.
References _jsSelf, RunningStack::back, OOJavaScriptEngine::callJSFunction:forObject:argc:argv:result:, OOJSAcquireContext(), OOJSRelinquishContext(), OOJSReportPendingException(), OOJavaScriptEngine::sharedEngine, and sRunningStack.
|
implementation |
Provided by category OOJSScript(OOPrivate).
Definition at line 585 of file OOJSScript.m.
Referenced by initWithPath:properties:.
| + (OOJSScript *) currentlyRunningScript |
Definition at line 101 of file OOJSScript.m.
References currentlyRunningScript, nil, and sRunningStack.
Referenced by currentlyRunningScript, OOJSGuiScreenKeyDefinition::init, OOJSInterfaceDefinition::init, OOJSPopulatorDefinition::init, OOJSTimer::initWithDelay:interval:context:function:this:, OOJSTimer(Private)::initWithDelay:interval:context:function:this:, LogProblem(), LogProblem(), MissionRunScreen(), MissionRunScreen(), MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), ReportJSError(), OOSystemInfo::setValue:forKey:, SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), SystemInfoStaticSetInterstellarProperty(), SystemSetProperty(), and SystemSetProperty().
| + (OOJSScript *) currentlyRunningScript |
| + (OOJSScript *) currentlyRunningScript |
|
implementation |
Definition at line 256 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 554 of file OOJSScript.m.
Referenced by initWithPath:properties:.
|
implementation |
Provided by category OOJSScript(OOPrivate).
| - (BOOL) defineProperty: | (id) | value | |
| named: | (NSString*) | name |
Definition at line 459 of file OOJSScript.m.
References _jsSelf, defineProperty:withID:inContext:, nil, OOJSAcquireContext(), and OOJSRelinquishContext().
Referenced by initWithPath:properties:.
| - (BOOL) defineProperty: | (id) | value | |
| named: | (NSString *) | name |
| - (BOOL) defineProperty: | (id) | value | |
| withID: | (JSAtom) | propID | |
| inContext: | (JSContext*) | context |
Definition at line 421 of file OOJSScript.m.
| - (BOOL) defineProperty: | (id) | value | |
| withID: | (jsid) | propID | |
| inContext: | (JSContext*) | context |
Definition at line 421 of file OOJSScript.m.
References _jsSelf, OOJS_PROP_READONLY, and OOJSValueFromNativeObject().
Referenced by defineProperty:named:.
|
implementation |
Reimplemented from OOScript.
Definition at line 286 of file OOJSScript.m.
References _jsSelf, and descriptionComponents.
Referenced by descriptionComponents.
| - (NSString *) displayName |
Reimplemented from OOScript.
Definition at line 118 of file OOJSScript.m.
References _name, _version, displayName, and nil.
Referenced by displayName, initWithPath:properties:, LogProblem(), and version.
| - (id) initWithPath: | (NSString*) | path |
Definition at line 55 of file OOJSScript.m.
References _jsSelf, _path, nil, OOJSAcquireContext(), OOJSRelinquishContext(), OOJSReportPendingException(), OOLog, and sScriptClassID.
| - (id) initWithPath: | (NSString*) | path | |
| properties: | (NSDictionary*) | properties |
Definition at line 94 of file OOJSScript.m.
References _jsSelf, RunningStack::back, checkForTickle:, defaultPropertiesFromPath:, defineProperty:named:, description, DESTROY, displayName, filePath, foreachkey, kLocalManifestProperty, name, nil, OOConsumeReference(), OOJSAcquireContext(), OOJSID, OOJSRelinquishContext(), OOJSReportPendingException(), OOLog, OOLogERR, OOLogIndentIf, OOLogOutdentIf, propertyWithID:inContext:, RunScriptWithName(), scriptNameFromPath:, setProperty:named:, setProperty:withID:inContext:, OOJavaScriptEngine::sharedEngine, sRunningStack, sScriptClassID, version, and weakRetain.
| - (id) initWithPath: | (NSString *) | path | |
| properties: | (NSDictionary *) | properties |
|
implementation |
Definition at line 294 of file OOJSScript.m.
References _jsSelf, OOJSAcquireContext(), and OOJSRelinquishContext().
|
implementation |
Provided by category OOJSScript(Private).
Definition at line 166 of file OOJSScript.m.
|
implementation |
Definition at line 281 of file OOJSScript.m.
References oo_jsClassName.
Referenced by oo_jsClassName.
|
implementation |
Definition at line 492 of file OOJSScript.m.
References _jsSelf.
| + (void) popScript: | (OOJSScript*) | script |
Definition at line 493 of file OOJSScript.m.
References sRunningStack.
Referenced by OOJSFunction::evaluateWithContext:scope:argc:argv:result:, MissionRunCallback(), MissionRunCallback(), OOJSGuiScreenKeyDefinition::runCallback:, OOJSInterfaceDefinition::runCallback:, OOJSPopulatorDefinition::runCallback:, and OOJSTimer::timerFired.
| + (void) popScript: | (OOJSScript *) | script |
| - (id) propertyNamed: | (NSString*) | name |
Definition at line 431 of file OOJSScript.m.
References _jsSelf, nil, OOJSAcquireContext(), OOJSRelinquishContext(), and propertyWithID:inContext:.
Referenced by OOSystemInfo::setValue:forKey:, SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), SystemInfoStaticSetInterstellarProperty(), SystemSetProperty(), and SystemSetProperty().
| - (id) propertyNamed: | (NSString *) | name |
| - (id) propertyWithID: | (JSAtom) | propID | |
| inContext: | (JSContext*) | context |
Definition at line 394 of file OOJSScript.m.
| - (id) propertyWithID: | (jsid) | propID | |
| inContext: | (JSContext*) | context |
Definition at line 394 of file OOJSScript.m.
References _jsSelf, nil, and OOJSNativeObjectFromJSValue().
Referenced by initWithPath:properties:, and propertyNamed:.
| + (void) pushScript: | (OOJSScript*) | script |
Definition at line 480 of file OOJSScript.m.
References RunningStack::back, RunningStack::current, and sRunningStack.
Referenced by OOJSFunction::evaluateWithContext:scope:argc:argv:result:, MissionRunCallback(), MissionRunCallback(), OOJSGuiScreenKeyDefinition::runCallback:, OOJSInterfaceDefinition::runCallback:, OOJSPopulatorDefinition::runCallback:, and OOJSTimer::timerFired.
| + (void) pushScript: | (OOJSScript *) | script |
|
implementation |
Reimplemented from OOScript.
Definition at line 353 of file OOJSScript.m.
|
implementation |
Reimplemented from OOScript.
Definition at line 343 of file OOJSScript.m.
References description, and scriptDescription.
Referenced by scriptDescription.
|
implementation |
Provided by category OOJSScript(OOPrivate).
Definition at line 522 of file OOJSScript.m.
Referenced by initWithPath:properties:.
|
implementation |
Provided by category OOJSScript(OOPrivate).
| - (JSValueConst) scriptObject |
Definition at line 125 of file OOJSScript.m.
References _jsSelf, and scriptObject.
Referenced by scriptObject, and version.
| + (NSArray *) scriptStack |
Definition at line 283 of file OOJSScript.m.
References AddStackToArrayReversed(), nil, scriptStack, and sRunningStack.
Referenced by scriptStack.
| + (NSArray *) scriptStack |
| + (id) scriptWithPath: | (NSString*) | path |
Definition at line 50 of file OOJSScript.m.
Referenced by RunBehaviourTests(), RunErrorTests(), RunScopeTests(), and RunTimeLimiterTests().
| + (id) scriptWithPath: | (NSString*) | path | |
| properties: | (NSDictionary*) | properties |
Definition at line 89 of file OOJSScript.m.
Referenced by OOScript::jsAIScriptFromFileNamed:properties:, OOScript::jsScriptFromFileNamed:properties:, OOCheckJSSyntaxVerifierStage::run, OOScript::scriptsFromFileAtPath:, and OOScript::worldScriptsAtPath:.
| + (id) scriptWithPath: | (NSString *) | path | |
| properties: | (NSDictionary *) | properties |
| - (BOOL) setProperty: | (id) | value | |
| named: | (NSString*) | name |
Definition at line 445 of file OOJSScript.m.
References _jsSelf, nil, OOJSAcquireContext(), OOJSRelinquishContext(), and setProperty:withID:inContext:.
Referenced by initWithPath:properties:.
| - (BOOL) setProperty: | (id) | value | |
| named: | (NSString *) | name |
| - (BOOL) setProperty: | (id) | value | |
| withID: | (JSAtom) | propID | |
| inContext: | (JSContext*) | context |
Definition at line 411 of file OOJSScript.m.
| - (BOOL) setProperty: | (id) | value | |
| withID: | (jsid) | propID | |
| inContext: | (JSContext*) | context |
Definition at line 411 of file OOJSScript.m.
References _jsSelf, and OOJSValueFromNativeObject().
Referenced by initWithPath:properties:, and setProperty:named:.
|
implementation |
Provided by category OOJSScript(Private).
Definition at line 214 of file OOJSScript.m.
Referenced by OOJSScript(Private)::loadScriptWithContext:.
| - (NSString *) version |
Reimplemented from OOScript.
References displayName, scriptObject, and version.
|
implementation |
Reimplemented from <OOWeakReferenceSupport>.
Definition at line 328 of file OOJSScript.m.
|
implementation |
Definition at line 321 of file OOJSScript.m.
References nil, OOWeakReference::weakRefWithObject:, weakRetain, and weakSelf.
Referenced by OOJSGuiScreenKeyDefinition::init, OOJSInterfaceDefinition::init, OOJSPopulatorDefinition::init, OOJSTimer::initWithDelay:interval:context:function:this:, OOJSTimer(Private)::initWithDelay:interval:context:function:this:, initWithPath:properties:, LogProblem(), ReportJSError(), and weakRetain.
|
private |
Definition at line 32 of file OOJSScript.h.
Referenced by callMethod:inContext:withArguments:count:result:, callMethodNamed:withArguments:count:result:, dealloc, defineProperty:named:, defineProperty:withID:inContext:, descriptionComponents, initWithPath:, initWithPath:properties:, javaScriptEngineWillReset:, oo_jsValueInContext:, propertyNamed:, propertyWithID:inContext:, scriptObject, setProperty:named:, and setProperty:withID:inContext:.
|
private |
Definition at line 32 of file OOJSScript.h.
|
private |
Definition at line 34 of file OOJSScript.h.
Referenced by displayName.
|
private |
Definition at line 36 of file OOJSScript.h.
Referenced by initWithPath:.
|
private |
Definition at line 35 of file OOJSScript.h.
Referenced by displayName.
|
private |
Definition at line 35 of file OOJSScript.h.
Referenced by dealloc, initWithPath:properties:, and scriptDescription.
|
private |
Definition at line 37 of file OOJSScript.h.
Referenced by dealloc, and initWithPath:properties:.
|
private |
Definition at line 108 of file OOJSScript.m.
Referenced by callMethod:inContext:withArguments:count:result:, dealloc, initWithPath:properties:, MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), and name.
|
private |
Definition at line 113 of file OOJSScript.m.
Referenced by dealloc, initWithPath:properties:, and version.
|
private |
Definition at line 39 of file OOJSScript.h.
Referenced by weakRefDied:, and weakRetain.